Struct objc2::runtime::AnyProtocol
source · #[repr(C)]pub struct AnyProtocol(_);
Expand description
A type that represents an Objective-C protocol.
Implementations§
source§impl AnyProtocol
impl AnyProtocol
sourcepub fn get(name: &str) -> Option<&'static Self>
pub fn get(name: &str) -> Option<&'static Self>
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 Self]>
Available on crate feature malloc
only.
pub fn protocols() -> Malloc<[&'static Self]>
malloc
only.Obtains the list of registered protocol definitions.
sourcepub fn adopted_protocols(&self) -> Malloc<[&AnyProtocol]>
Available on crate feature malloc
only.
pub fn adopted_protocols(&self) -> Malloc<[&AnyProtocol]>
malloc
only.Get a list of the protocols to which this protocol conforms.
sourcepub fn conforms_to(&self, proto: &AnyProtocol) -> bool
pub fn conforms_to(&self, proto: &AnyProtocol) -> bool
Checks whether this protocol conforms to the specified protocol.
Trait Implementations§
source§impl Debug for AnyProtocol
impl Debug for AnyProtocol
source§impl Display for AnyProtocol
impl Display for AnyProtocol
source§impl PartialEq<AnyProtocol> for AnyProtocol
impl PartialEq<AnyProtocol> for AnyProtocol
source§impl RefEncode for AnyProtocol
impl RefEncode for AnyProtocol
source§const 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 AnyProtocol
impl RefUnwindSafe for AnyProtocol
impl Send for AnyProtocol
impl Sync for AnyProtocol
impl UnwindSafe for AnyProtocol
Auto Trait Implementations§
impl !Unpin for AnyProtocol
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more