Struct objc::declare::ProtocolDecl [−][src]
pub struct ProtocolDecl { /* fields omitted */ }
A type for declaring a new protocol and adding new methods to it before registering it.
Methods
impl ProtocolDecl
[src]
impl ProtocolDecl
pub fn new(name: &str) -> Option<ProtocolDecl>
[src]
pub fn new(name: &str) -> Option<ProtocolDecl>
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,
[src]
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.
pub fn add_class_method_description<Args, Ret>(
&mut self,
sel: Sel,
is_required: bool
) where
Args: EncodeArguments,
Ret: Encode,
[src]
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.
pub fn add_protocol(&mut self, proto: &Protocol)
[src]
pub fn add_protocol(&mut self, proto: &Protocol)
Adds a requirement on another protocol.
pub fn register(self) -> &'static Protocol
[src]
pub fn register(self) -> &'static Protocol
Registers self, consuming it and returning a reference to the
newly registered Protocol
.
Auto Trait Implementations
impl !Send for ProtocolDecl
impl !Send for ProtocolDecl
impl !Sync for ProtocolDecl
impl !Sync for ProtocolDecl