#[repr(transparent)]pub struct Sel { /* private fields */ }
Expand description
A method selector.
The Rust equivalent of Objective-C’s SEL
type. You can easily create
this using the sel!
macro.
The main reason the Objective-C runtime uses a custom types for selectors is to support efficient comparison - a selector is effectively just an interned string, so this makes that very easy!
This guarantees the null-pointer optimization, namely that Option<Sel>
is the same size as Sel
.
Implementations
Trait Implementations
sourceimpl PartialEq<Sel> for Sel
impl PartialEq<Sel> for Sel
impl Copy for Sel
impl Eq for Sel
impl RefUnwindSafe for Sel
impl Send for Sel
impl StructuralEq for Sel
impl StructuralPartialEq for Sel
impl Sync for Sel
impl UnwindSafe for Sel
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