[][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.

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]

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 !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]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]