pub struct Object(/* private fields */);Expand description
The root class of most Objective-C class hierarchies.
C++ equivalent: NS::Object
Implementations§
Source§impl Object
impl Object
Sourcepub fn hash(&self) -> UInteger
pub fn hash(&self) -> UInteger
Get the hash value of this object.
C++ equivalent: UInteger hash() const
Sourcepub fn is_equal(&self, other: &Object) -> bool
pub fn is_equal(&self, other: &Object) -> bool
Check if this object is equal to another.
C++ equivalent: bool isEqual(const Object* pObject) const
Sourcepub fn description(&self) -> *mut c_void
pub fn description(&self) -> *mut c_void
Get a string description of this object.
C++ equivalent: class String* description() const
Sourcepub fn debug_description(&self) -> *mut c_void
pub fn debug_description(&self) -> *mut c_void
Get a debug description of this object.
C++ equivalent: class String* debugDescription() const
Sourcepub fn alloc_with_class(cls: Class) -> Option<Self>
pub fn alloc_with_class(cls: Class) -> Option<Self>
Allocate an instance of a class.
C++ equivalent: template <class _Class> static _Class* alloc(const void* pClass)
Sourcepub fn init(&self) -> Option<Self>
pub fn init(&self) -> Option<Self>
Initialize an allocated object.
C++ equivalent: template <class _Class> _Class* init()
Sourcepub fn responds_to_selector(&self, selector: Sel) -> bool
pub fn responds_to_selector(&self, selector: Sel) -> bool
Check if this object responds to a selector.
Trait Implementations§
Source§impl Referencing for Object
impl Referencing for Object
Source§fn as_mut_ptr(&self) -> *mut c_void
fn as_mut_ptr(&self) -> *mut c_void
Get the raw mutable pointer to the Objective-C object.
Source§fn retain(&self) -> Selfwhere
Self: Clone,
fn retain(&self) -> Selfwhere
Self: Clone,
Retain the object, incrementing its reference count. Read more
Source§fn autorelease(&self) -> Selfwhere
Self: Clone,
fn autorelease(&self) -> Selfwhere
Self: Clone,
Autorelease the object. Read more
Source§fn retain_count(&self) -> UInteger
fn retain_count(&self) -> UInteger
Get the retain count of the object. Read more
impl Send for Object
impl Sync for Object
Auto Trait Implementations§
impl Freeze for Object
impl RefUnwindSafe for Object
impl Unpin for Object
impl UnwindSafe for Object
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