NSNull

Struct NSNull 

Source
#[repr(C)]
pub struct NSNull(/* private fields */);
Expand description

A singleton object used to represent null values in collection objects that don’t allow nil values.

See documentation.

Implementations§

Source§

impl NSNull

Source

pub fn null() -> &'static Self

Returns the singleton instance.

See documentation.

Methods from Deref<Target = NSObject<'static>>§

Source

pub fn retain_count(&self) -> usize

Returns this object’s reference count.

This method is only useful for debugging certain objects.

See documentation.

Source

pub fn responds_to_selector(&self, selector: Sel) -> bool

Returns true if this object implements or inherits a method that can respond to a specified message.

See documentation.

Source

pub fn is_kind_of_class(&self, class: &Class) -> bool

Returns true if this object is an instance or subclass of class.

See documentation

Source

pub fn is_member_of_class(&self, class: &Class) -> bool

Returns true if this object is an instance of class.

See documentation

Source

pub fn hash(&self) -> NSUInteger

Returns an integer that can be used as a table address in a hash table structure.

See documentation.

Source

pub fn copy(&self) -> Arc<Self>

Returns a copy of this object using NSCopying.

See documentation.

Source

pub fn mutable_copy(&self) -> Arc<Self>

Returns a copy of this object using NSMutableCopying.

See documentation.

Source

pub fn description(&self) -> Arc<NSString<'static>>

Returns a string that describes the contents of this object.

See documentation

Source

pub fn debug_description(&self) -> Arc<NSString<'static>>

Returns a string that describes the contents of the receiver for presentation in the debugger.

See documentation

Trait Implementations§

Source§

impl AsMut<NSNull> for NSNull

Source§

fn as_mut(&mut self) -> &mut Self

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<T> AsMut<T> for NSNull
where NSObject<'static>: AsMut<T>,

Source§

fn as_mut(&mut self) -> &mut T

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<NSNull> for NSNull

Source§

fn as_ref(&self) -> &Self

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T> AsRef<T> for NSNull
where NSObject<'static>: AsRef<T>,

Source§

fn as_ref(&self) -> &T

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl ClassType<'static> for NSNull

Source§

fn class() -> &'static Class

Returns the Objective-C class that can be used to instantiate a new instance of Self. Read more
Source§

impl Default for &NSNull

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Deref for NSNull

Source§

type Target = NSObject<'static>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl ObjectType<'static> for NSNull

Source§

fn as_objc_object(&self) -> &ObjCObject<'data>

Casts self into a type-erased Objective-C object.
Source§

fn class<'s>(&'s self) -> &'s Class
where 'data: 's,

Returns the class that this object is an instance of.
Source§

impl ObjectType for NSNull

Source§

fn retain(obj: &Self) -> Arc<Self>

Increments the object’s retain count and returns a smart pointer that automatically calls release on Drop. Read more
Source§

unsafe fn release(obj: NonNull<Self>)

Decrements the object’s retain count. Read more

Auto Trait Implementations§

§

impl !Freeze for NSNull

§

impl RefUnwindSafe for NSNull

§

impl Send for NSNull

§

impl Sync for NSNull

§

impl Unpin for NSNull

§

impl UnwindSafe for NSNull

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.