[−][src]Struct objc::declare::ProtocolDecl
A type for declaring a new protocol and adding new methods to it before registering it.
Implementations
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 RefUnwindSafe for ProtocolDecl
impl !Send for ProtocolDecl
impl !Sync for ProtocolDecl
impl Unpin for ProtocolDecl
impl UnwindSafe for ProtocolDecl
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,