[−][src]Struct objc::declare::ProtocolDecl
A type for declaring a new protocol and adding new methods to it before registering it.
Methods
impl ProtocolDecl
[src]
pub fn new(name: &str) -> Option<ProtocolDecl>
[src]
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]
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]
&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]
Adds a requirement on another protocol.
pub fn register(self) -> &'static Protocol
[src]
Registers self, consuming it and returning a reference to the
newly registered Protocol
.
Auto Trait Implementations
impl !Send for ProtocolDecl
impl !Sync for ProtocolDecl
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,