pub struct Sel(/* private fields */);Expand description
Objective-C selector.
A selector is a unique identifier for a method name. Selectors are registered with the runtime and can be compared by pointer equality.
Implementations§
Source§impl Sel
impl Sel
Sourcepub fn register(name: &str) -> Self
pub fn register(name: &str) -> Self
Register a selector with the given name.
The selector is cached by the runtime, so subsequent calls with the same name will return the same selector.
Sourcepub unsafe fn register_cstr(name: *const c_char) -> Self
pub unsafe fn register_cstr(name: *const c_char) -> Self
Register a selector from a null-terminated C string.
§Safety
The pointer must be a valid null-terminated C string.
Trait Implementations§
impl Copy for Sel
impl Eq for Sel
impl Send for Sel
impl StructuralPartialEq for Sel
impl Sync for Sel
Auto Trait Implementations§
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