[−][src]Struct fruity::objc::NSObject
The root class for most Objective-C objects.
See documentation.
Implementations
impl NSObject
[src]
pub fn class() -> &'static Class
[src]
Returns the NSObject
class.
pub const unsafe fn from_ptr(ptr: *mut Object) -> Self
[src]
Creates an object from a raw nullable pointer.
Safety
The pointer must point to a valid NSObject
instance.
pub const unsafe fn from_non_null_ptr(ptr: NonNull<Object>) -> Self
[src]
Creates an object from a raw non-null pointer.
Safety
The pointer must point to a valid NSObject
instance.
pub fn as_id(&self) -> &id
[src]
Returns a pointer to this object's data.
pub fn as_ptr(&self) -> *mut Object
[src]
Returns a raw nullable pointer to this object's data.
pub fn as_non_null_ptr(&self) -> NonNull<Object>
[src]
Returns a raw non-null pointer to this object's data.
pub fn responds_to_selector(&self, selector: SEL) -> bool
[src]
Returns true
if this object implements or inherits a method that can
respond to a specified message.
See documentation.
pub fn is_kind_of_class(&self, class: &Class) -> bool
[src]
Returns true
if this object is an instance or subclass of class
.
See documentation
pub fn is_member_of_class(&self, class: &Class) -> bool
[src]
Returns true
if this object is an instance of class
.
See documentation
pub fn hash(&self) -> NSUInteger
[src]
Returns an integer that can be used as a table address in a hash table structure.
See documentation.
pub fn copy(&self) -> NSObject
[src]
Returns a copy of this object using
NSCopying
.
See documentation.
pub fn mutable_copy(&self) -> NSObject
[src]
Returns a copy of this object using
NSMutableCopying
.
See documentation.
Methods from Deref<Target = id>
pub fn as_ptr(&self) -> *mut Object
[src]
Casts self
to a raw nullable pointer.
pub fn as_non_null_ptr(&self) -> NonNull<Object>
[src]
Casts self
to a raw non-null pointer.
Trait Implementations
impl AsRef<NSObject> for NSObject
[src]
impl Clone for NSObject
[src]
impl Debug for NSObject
[src]
impl Deref for NSObject
[src]
impl From<NSMutableString> for NSObject
[src]
fn from(obj: NSMutableString) -> Self
[src]
impl From<NSString> for NSObject
[src]
Auto Trait Implementations
impl !RefUnwindSafe for NSObject
impl Send for NSObject
impl Sync for NSObject
impl Unpin for NSObject
impl !UnwindSafe for NSObject
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,