#[repr(C)]pub struct Protocol(_);
Expand description
A type that represents an Objective-C protocol.
Implementations
sourceimpl Protocol
impl Protocol
sourcepub fn get(name: &str) -> Option<&'static Protocol>
pub fn get(name: &str) -> Option<&'static Protocol>
Returns the protocol definition of a specified protocol, or None
if the protocol is not registered with the Objective-C runtime.
sourcepub fn protocols() -> Malloc<[&'static Protocol]>
Available on crate feature malloc
only.
pub fn protocols() -> Malloc<[&'static Protocol]>
malloc
only.Obtains the list of registered protocol definitions.
sourcepub fn adopted_protocols(&self) -> Malloc<[&Protocol]>
Available on crate feature malloc
only.
pub fn adopted_protocols(&self) -> Malloc<[&Protocol]>
malloc
only.Get a list of the protocols to which this protocol conforms.
sourcepub fn conforms_to(&self, proto: &Protocol) -> bool
pub fn conforms_to(&self, proto: &Protocol) -> bool
Checks whether this protocol conforms to the specified protocol.
Trait Implementations
sourceimpl PartialEq<Protocol> for Protocol
impl PartialEq<Protocol> for Protocol
sourceimpl RefEncode for Protocol
impl RefEncode for Protocol
sourceconst ENCODING_REF: Encoding = Encoding::Object
const ENCODING_REF: Encoding = Encoding::Object
The Objective-C type-encoding for a reference of this type. Read more
impl Eq for Protocol
impl RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl UnwindSafe for Protocol
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more