[][src]Struct objc::declare::ProtocolDecl

pub struct ProtocolDecl { /* fields omitted */ }

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]

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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.