pub struct Sel(/* private fields */);Expand description
Implementations§
Source§impl Sel
impl Sel
Sourcepub unsafe fn register(name: *const c_char) -> Self
pub unsafe fn register(name: *const c_char) -> Self
Registers a method name with the Objective-C runtime and returns the selector.
§Safety
The name must be a non-null UTF-8 C string.
Sourcepub const unsafe fn from_non_null_ptr(ptr: NonNull<c_void>) -> Self
pub const unsafe fn from_non_null_ptr(ptr: NonNull<c_void>) -> Self
Creates a selector from a raw non-null pointer.
§Safety
The pointer must point to valid selector data.
Sourcepub const fn as_ptr(&self) -> *const c_void
pub const fn as_ptr(&self) -> *const c_void
Returns a raw nullable pointer to this selector’s data.
Sourcepub const fn as_non_null_ptr(&self) -> NonNull<c_void>
pub const fn as_non_null_ptr(&self) -> NonNull<c_void>
Returns a raw non-null pointer to this selector’s data.
Trait Implementations§
impl Copy for Sel
impl Eq for Sel
impl Send 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