Struct makepad_objc_sys::declare::ProtocolDecl
source · [−]pub struct ProtocolDecl { /* private fields */ }
Expand description
A type for declaring a new protocol and adding new methods to it before registering it.
Implementations
sourceimpl ProtocolDecl
impl ProtocolDecl
sourcepub fn new(name: &str) -> Option<ProtocolDecl>
pub fn new(name: &str) -> Option<ProtocolDecl>
Constructs a ProtocolDecl
with the given name. Returns None
if the
protocol couldn’t be allocated.
sourcepub fn add_method_description<Args, Ret>(&mut self, sel: Sel, is_required: bool)where
Args: EncodeArguments,
Ret: Encode,
pub fn add_method_description<Args, Ret>(&mut self, sel: Sel, is_required: bool)where
Args: EncodeArguments,
Ret: Encode,
Adds an instance method declaration with a given description to self.
sourcepub fn add_class_method_description<Args, Ret>(
&mut self,
sel: Sel,
is_required: bool
)where
Args: EncodeArguments,
Ret: Encode,
pub fn add_class_method_description<Args, Ret>(
&mut self,
sel: Sel,
is_required: bool
)where
Args: EncodeArguments,
Ret: Encode,
Adds a class method declaration with a given description to self.
sourcepub fn add_protocol(&mut self, proto: &Protocol)
pub fn add_protocol(&mut self, proto: &Protocol)
Adds a requirement on another 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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