pub struct ProtocolDecl { /* private fields */ }
Expand description
A type for declaring a new protocol and adding new methods to it before registering it.
Implementations§
Source§impl ProtocolDecl
impl ProtocolDecl
Sourcepub fn new(name: &str) -> Option<ProtocolDecl>
pub fn new(name: &str) -> Option<ProtocolDecl>
Constructs a ProtocolDecl
with the given name. Returns None
if the
protocol couldn’t be allocated.
Sourcepub fn add_method_description<Args, Ret>(&mut self, sel: Sel, is_required: bool)where
Args: EncodeArguments,
Ret: Encode,
pub fn add_method_description<Args, Ret>(&mut self, sel: Sel, is_required: bool)where
Args: EncodeArguments,
Ret: Encode,
Adds an instance method declaration with a given description to self.
Sourcepub fn add_class_method_description<Args, Ret>(
&mut self,
sel: Sel,
is_required: bool,
)where
Args: EncodeArguments,
Ret: Encode,
pub fn add_class_method_description<Args, Ret>(
&mut self,
sel: Sel,
is_required: bool,
)where
Args: EncodeArguments,
Ret: Encode,
Adds a class method declaration with a given description to self.
Sourcepub fn add_protocol(&mut self, proto: &Protocol)
pub fn add_protocol(&mut self, proto: &Protocol)
Adds a requirement on another protocol.
Auto Trait Implementations§
impl Freeze for ProtocolDecl
impl RefUnwindSafe for ProtocolDecl
impl !Send for ProtocolDecl
impl !Sync for ProtocolDecl
impl Unpin for ProtocolDecl
impl UnwindSafe for ProtocolDecl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more