Struct objc2::declare::ProtocolDecl [−][src]
pub struct ProtocolDecl { /* fields omitted */ }
Expand description
A type for declaring a new protocol and adding new methods to it before registering it.
Implementations
Constructs a ProtocolDecl
with the given name.
Returns None
if the protocol couldn’t be allocated.
pub 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.
pub 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.
Adds a requirement on another protocol.
Registers the ProtocolDecl
, consuming it and returning a reference
to the newly registered Protocol
.