[][src]Struct fruity::objc::NSObject

#[repr(transparent)]pub struct 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]

type Target = id

The resulting type after dereferencing.

impl From<NSMutableString> for NSObject[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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.