NSNumber

Struct NSNumber 

Source
#[repr(C)]
pub struct NSNumber { pub ptr: Id<Object>, }
Expand description

An object wrapper for primitive scalar numeric values.

Fields§

§ptr: Id<Object>

The raw pointer to the Objective-C object.

Implementations§

Source§

impl NSNumber

Source

pub fn number_with_bool(value: bool) -> Self

Creates and returns an NSNumber object containing a given value, treating it as a BOOL.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn number_with_char(value: c_schar) -> Self

Creates and returns an NSNumber object containing a given value, treating it as a signed char.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn number_with_double(value: c_double) -> Self

Creates and returns an NSNumber object containing a given value, treating it a double.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn number_with_float(value: c_float) -> Self

Creates and returns an NSNumber object containing a given value, treating it as a float.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn number_with_int(value: c_int) -> Self

Creates and returns an NSNumber object containing a given value, treating it as a signed int.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn number_with_integer(value: Int) -> Self

Creates and returns an NSNumber object containing a given value, treating it as an NSInteger.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn number_with_long(value: c_long) -> Self

Creates and returns an NSNumber object containing a given value, treating it as a signed long.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn number_with_long_long(value: c_longlong) -> Self

Creates and returns an NSNumber object containing a given value, treating it as a signed long long.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn number_with_short(value: c_short) -> Self

Creates and returns an NSNumber object containing value, treating it as a signed short.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn number_with_unsigned_char(value: c_uchar) -> Self

Creates and returns an NSNumber object containing a given value, treating it as an unsigned char.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn number_with_unsigned_int(value: c_uint) -> Self

Creates and returns an NSNumber object containing a given value, treating it as an unsigned int.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn number_with_unsigned_integer(value: UInt) -> Self

Creates and returns an NSNumber object containing a given value, treating it as an NSUInteger.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn number_with_unsigned_long(value: c_ulong) -> Self

Creates and returns an NSNumber object containing a given value, treating it as an unsigned long.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn number_with_unsigned_long_long(value: c_ulonglong) -> Self

Creates and returns an NSNumber object containing a given value, treating it as an unsigned long long.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn number_with_unsigned_short(value: c_ushort) -> Self

Creates and returns an NSNumber object containing a given value, treating it as an unsigned short.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn init_with_bool(&mut self, value: bool) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as a BOOL.

§Arguments
  • value - The value to store in the NSNumber object.
Source

pub fn init_with_char(&mut self, value: c_schar) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as a signed char.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn init_with_double(&mut self, value: c_double) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain value, treated as a double.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn init_with_float(&mut self, value: c_float) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as a float.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn init_with_int(&mut self, value: c_int) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as a signed int.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn init_with_integer(&mut self, value: Int) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as an NSInteger.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn init_with_long(&mut self, value: c_long) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as a signed long.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn init_with_long_long(&mut self, value: c_longlong) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain value, treated as a signed long long.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn init_with_short(&mut self, value: c_short) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as a signed short.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn init_with_unsigned_char(&mut self, value: c_uchar) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as an unsigned char.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn init_with_unsigned_int(&mut self, value: c_uint) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as an unsigned int.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn init_with_unsigned_integer(&mut self, value: c_uint) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as an NSUInteger.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn init_with_unsigned_long(&mut self, value: c_ulong) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as an unsigned long.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn init_with_unsigned_long_long(&mut self, value: c_ulonglong) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as an unsigned long long.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn init_with_unsigned_short(&mut self, value: c_ushort) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as an unsigned short.

§Arguments
  • value - The value to store in the NSNumber object.
§Returns

Returns an NSNumber object containing the value.

Source

pub fn bool_value(&self) -> bool

The number object’s value expressed as a Boolean value.

Source

pub fn char_value(&self) -> c_schar

The number object’s value expressed as a char.

Source

pub fn decimal_value(&self) -> NSDecimal

The number object’s value expressed as an NSDecimal structure.

Source

pub fn double_value(&self) -> c_double

The number object’s value expressed as a double, converted as necessary.

Source

pub fn float_value(&self) -> c_float

The number object’s value expressed as a float, converted as necessary.

Source

pub fn int_value(&self) -> c_int

The number object’s value expressed as an int, converted as necessary.

Source

pub fn integer_value(&self) -> Int

The number object’s value expressed as an NSInteger object, converted as necessary.

Source

pub fn long_long_value(&self) -> c_longlong

The number object’s value expressed as a long long, converted as necessary.

Source

pub fn long_value(&self) -> c_long

The number object’s value expressed as a long, converted as necessary.

Source

pub fn short_value(&self) -> c_short

The number object’s value expressed as a short, converted as necessary.

Source

pub fn unsigned_char_value(&self) -> c_uchar

The number object’s value expressed as an unsigned char, converted as necessary.

Source

pub fn unsigned_integer_value(&self) -> UInt

The number object’s value expressed as an NSUInteger object, converted as necessary.

Source

pub fn unsigned_int_value(&self) -> c_uint

The number object’s value expressed as an unsigned int, converted as necessary.

Source

pub fn unsigned_long_long_value(&self) -> c_ulonglong

The number object’s value expressed as an unsigned long long, converted as necessary.

Source

pub fn unsigned_long_value(&self) -> c_ulong

The number object’s value expressed as an unsigned long, converted as necessary.

Source

pub fn unsigned_short_value(&self) -> c_ushort

The number object’s value expressed as an unsigned short, converted as necessary.

Source

pub fn description_with_locale(&self, locale: &NSLocale) -> NSString

Returns a string that represents the contents of the number object for a given locale.

§Arguments
  • locale - The locale to use to format the number.
§Returns

A string that represents the contents of the number object formatted using the locale information in locale.

Source

pub fn string_value(&self) -> NSString

The number object’s value expressed as a human-readable string.

Source

pub fn compare(&self, other: &Self) -> NSComparisonResult

Returns an NSComparisonResult value that indicates whether the number object’s value is greater than, equal to, or less than a given number.

§Arguments
  • other - The number to compare to the number object’s value.
Source

pub fn is_equal_to_number(&self, other: &Self) -> bool

Returns a Boolean value that indicates whether the number object’s value and a given number are equal.

§Arguments
  • other - The number to compare to the number object’s value.
Source

pub fn objc_type(&self) -> *const char

Returns a C string containing the Objective-C type of the data contained in the number object.

§Return Value

A C string containing the Objective-C type of the data contained in the number object, as encoded by the @encode() compiler directive.

Source

pub fn init_with_coder(&mut self, coder: &NSCoder) -> Self
where Self: Sized + FromId,

Methods from Deref<Target = Object>§

Source

pub fn class(&self) -> &Class

Returns the class of self.

Source

pub unsafe fn get_ivar<T>(&self, name: &str) -> &T
where T: Encode,

Returns a reference to the ivar of self with the given name. Panics if self has no ivar with the given name. Unsafe because the caller must ensure that the ivar is actually of type T.

Source

pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut T
where T: Encode,

Returns a mutable reference to the ivar of self with the given name. Panics if self has no ivar with the given name. Unsafe because the caller must ensure that the ivar is actually of type T.

Source

pub unsafe fn set_ivar<T>(&mut self, name: &str, value: T)
where T: Encode,

Sets the value of the ivar of self with the given name. Panics if self has no ivar with the given name. Unsafe because the caller must ensure that the ivar is actually of type T.

Trait Implementations§

Source§

impl Add for NSNumber

Source§

type Output = NSNumber

The resulting type after applying the + operator.
Source§

fn add(self, other: Self) -> Self

Performs the + operation. Read more
Source§

impl Clone for NSNumber

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NSNumber

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NSNumber

Source§

fn default() -> Self

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

impl Deref for NSNumber

Source§

type Target = Object

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl DerefMut for NSNumber

Source§

fn deref_mut(&mut self) -> &mut Object

Mutably dereferences the value.
Source§

impl Display for NSNumber

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Encode for NSNumber

Source§

fn encode() -> Encoding

Returns the Objective-C type encoding for Self.
Source§

impl From<f32> for NSNumber

Source§

fn from(value: c_float) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for NSNumber

Source§

fn from(value: c_double) -> Self

Converts to this type from the input type.
Source§

impl From<i16> for NSNumber

Source§

fn from(value: c_short) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for NSNumber

Source§

fn from(value: c_int) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for NSNumber

Source§

fn from(value: c_long) -> Self

Converts to this type from the input type.
Source§

impl From<i8> for NSNumber

Source§

fn from(value: c_schar) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for NSNumber

Source§

fn from(value: c_ushort) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for NSNumber

Source§

fn from(value: c_uint) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for NSNumber

Source§

fn from(value: c_ulong) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for NSNumber

Source§

fn from(value: c_uchar) -> Self

Converts to this type from the input type.
Source§

impl FromId for NSNumber

Source§

unsafe fn from_id(ptr: id) -> Self

Returns Self representation of the object. Read more
Source§

impl FromIterator<NSNumber> for NSArray<NSNumber>

Source§

fn from_iter<I>(iter: I) -> Self
where I: IntoIterator<Item = NSNumber>,

Creates a value from an iterator. Read more
Source§

impl<T> FromIterator<T> for NSNumber
where T: Into<NSNumber>,

Source§

fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl Hash for NSNumber

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl INSNumber for NSNumber

Source§

fn m_number_with_bool(value: bool) -> Self
where Self: Sized + 'static + FromId,

Creates and returns an NSNumber object containing a given value, treating it as a BOOL. Read more
Source§

fn m_number_with_char(value: c_schar) -> Self
where Self: Sized + FromId,

Creates and returns an NSNumber object containing a given value, treating it as a signed char. Read more
Source§

fn m_number_with_double(value: c_double) -> Self
where Self: Sized + FromId,

Creates and returns an NSNumber object containing a given value, treating it a double. Read more
Source§

fn m_number_with_float(value: c_float) -> Self
where Self: Sized + FromId,

Creates and returns an NSNumber object containing a given value, treating it as a float. Read more
Source§

fn m_number_with_int(value: c_int) -> Self
where Self: Sized + FromId,

Creates and returns an NSNumber object containing a given value, treating it as a signed int. Read more
Source§

fn m_number_with_integer(value: Int) -> Self
where Self: Sized + FromId,

Creates and returns an NSNumber object containing a given value, treating it as an NSInteger. Read more
Source§

fn m_number_with_long(value: c_long) -> Self
where Self: Sized + FromId,

Creates and returns an NSNumber object containing a given value, treating it as a signed long. Read more
Source§

fn m_number_with_long_long(value: c_longlong) -> Self
where Self: Sized + FromId,

Creates and returns an NSNumber object containing a given value, treating it as a signed long long. Read more
Source§

fn m_number_with_short(value: c_short) -> Self
where Self: Sized + FromId,

Creates and returns an NSNumber object containing value, treating it as a signed short. Read more
Source§

fn m_number_with_unsigned_char(value: c_uchar) -> Self
where Self: Sized + FromId,

Creates and returns an NSNumber object containing a given value, treating it as an unsigned char. Read more
Source§

fn m_number_with_unsigned_int(value: c_uint) -> Self
where Self: Sized + FromId,

Creates and returns an NSNumber object containing a given value, treating it as an unsigned int. Read more
Source§

fn m_number_with_unsigned_integer(value: UInt) -> Self
where Self: Sized + FromId,

Creates and returns an NSNumber object containing a given value, treating it as an NSUInteger. Read more
Source§

fn m_number_with_unsigned_long(value: c_ulong) -> Self
where Self: Sized + FromId,

Creates and returns an NSNumber object containing a given value, treating it as an unsigned long. Read more
Source§

fn m_number_with_unsigned_long_long(value: c_ulonglong) -> Self
where Self: Sized + FromId,

Creates and returns an NSNumber object containing a given value, treating it as an unsigned long long. Read more
Source§

fn m_number_with_unsigned_short(value: c_ushort) -> Self
where Self: Sized + FromId,

Creates and returns an NSNumber object containing a given value, treating it as an unsigned short. Read more
Source§

fn m_init_with_bool(&mut self, value: bool) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as a BOOL. Read more
Source§

fn m_init_with_char(&mut self, value: c_schar) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as a signed char. Read more
Source§

fn m_init_with_double(&mut self, value: c_double) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain value, treated as a double. Read more
Source§

fn m_init_with_float(&mut self, value: c_float) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as a float. Read more
Source§

fn m_init_with_int(&mut self, value: c_int) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as a signed int. Read more
Source§

fn m_init_with_integer(&mut self, value: Int) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as an NSInteger. Read more
Source§

fn m_init_with_long(&mut self, value: c_long) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as a signed long. Read more
Source§

fn m_init_with_long_long(&mut self, value: c_longlong) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain value, treated as a signed long long. Read more
Source§

fn m_init_with_short(&mut self, value: c_short) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as a signed short. Read more
Source§

fn m_init_with_unsigned_char(&mut self, value: c_uchar) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as an unsigned char. Read more
Source§

fn m_init_with_unsigned_int(&mut self, value: c_uint) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as an unsigned int. Read more
Source§

fn m_init_with_unsigned_integer(&mut self, value: c_uint) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as an NSUInteger. Read more
Source§

fn m_init_with_unsigned_long(&mut self, value: c_ulong) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as an unsigned long. Read more
Source§

fn m_init_with_unsigned_long_long(&mut self, value: c_ulonglong) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as an unsigned long long. Read more
Source§

fn m_init_with_unsigned_short(&mut self, value: c_ushort) -> Self
where Self: Sized + FromId,

Returns an NSNumber object initialized to contain a given value, treated as an unsigned short. Read more
Source§

fn p_bool_value(&self) -> bool

The number object’s value expressed as a Boolean value.
Source§

fn p_char_value(&self) -> c_schar

The number object’s value expressed as a char.
Source§

fn p_decimal_value(&self) -> NSDecimal

The number object’s value expressed as an NSDecimal structure.
Source§

fn p_double_value(&self) -> c_double

The number object’s value expressed as a double, converted as necessary.
Source§

fn p_float_value(&self) -> c_float

The number object’s value expressed as a float, converted as necessary.
Source§

fn p_int_value(&self) -> c_int

The number object’s value expressed as an int, converted as necessary.
Source§

fn p_integer_value(&self) -> Int

The number object’s value expressed as an NSInteger object, converted as necessary.
Source§

fn p_long_long_value(&self) -> c_longlong

The number object’s value expressed as a long long, converted as necessary.
Source§

fn p_long_value(&self) -> c_long

The number object’s value expressed as a long, converted as necessary.
Source§

fn p_short_value(&self) -> c_short

The number object’s value expressed as a short, converted as necessary.
Source§

fn p_unsigned_char_value(&self) -> c_uchar

The number object’s value expressed as an unsigned char, converted as necessary.
Source§

fn p_unsigned_integer_value(&self) -> UInt

The number object’s value expressed as an NSUInteger object, converted as necessary.
Source§

fn p_unsigned_int_value(&self) -> c_uint

The number object’s value expressed as an unsigned int, converted as necessary.
Source§

fn p_unsigned_long_long_value(&self) -> c_ulonglong

The number object’s value expressed as an unsigned long long, converted as necessary.
Source§

fn p_unsigned_long_value(&self) -> c_ulong

The number object’s value expressed as an unsigned long, converted as necessary.
Source§

fn p_unsigned_short_value(&self) -> c_ushort

The number object’s value expressed as an unsigned short, converted as necessary.
Source§

fn m_description_with_locale(&self, locale: &NSLocale) -> NSString

Returns a string that represents the contents of the number object for a given locale. Read more
Source§

fn p_string_value(&self) -> NSString

The number object’s value expressed as a human-readable string.
Source§

fn m_compare(&self, other: &Self) -> NSComparisonResult

Returns an NSComparisonResult value that indicates whether the number object’s value is greater than, equal to, or less than a given number. Read more
Source§

fn m_is_equal_to_number(&self, other: &Self) -> bool

Returns a Boolean value that indicates whether the number object’s value and a given number are equal. Read more
Source§

fn m_objc_type(&self) -> *const char

Returns a C string containing the Objective-C type of the data contained in the number object. Read more
Source§

fn m_init_with_coder(&mut self, coder: &NSCoder) -> Self
where Self: Sized + FromId,

Source§

impl PNSObject for NSNumber

Source§

fn m_class<'a>() -> &'a Class

Returns the class object for the receiver’s class.
Source§

fn m_self(&self) -> id

Returns the receiver.
Source§

fn m_new() -> Self
where Self: Sized + FromId,

Allocates a new instance of the receiving class, sends it an init message, and returns the initialized object.
Source§

fn m_alloc() -> Self
where Self: Sized + FromId,

Returns a new instance of the receiving class.
Source§

fn m_initialize()

Initializes the class before it receives its first message.
Source§

fn ip_superclass<'a>() -> Option<&'a Class>

Returns the class object for the receiver’s superclass.
Source§

fn m_is_equal(&self, object: &Self) -> bool

Returns a Boolean value that indicates whether the receiver and a given object are equal.
Source§

fn p_hash(&self) -> UInt

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

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

Returns a Boolean value that indicates whether the receiver is an instance of given class or an instance of any class that inherits from that class.
Source§

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

Returns a Boolean value that indicates whether the receiver is an instance of a given class.
Source§

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

Returns a Boolean value that indicates whether the receiver implements or inherits a method that can respond to a specified message.
Source§

fn m_conforms_to_protocol(&self, protocol: Protocol) -> bool

Returns a Boolean value that indicates whether the receiver conforms to a given protocol.
Source§

fn p_description(&self) -> NSString

A textual representation of the receiver.
Source§

fn p_debug_description(&self) -> NSString

A textual representation of the receiver to use with a debugger.
Source§

fn m_perform_selector(&self, selector: Sel) -> id

Sends a specified message to the receiver and returns the result of the message.
Source§

fn m_perform_selector_with_object(&self, selector: Sel, with_object: id) -> id

Sends a message to the receiver with an object as the argument.
Source§

fn m_is_proxy(&self) -> bool

Returns a Boolean value that indicates whether the receiver does not descend from NSObject.
Source§

impl PartialEq for NSNumber

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl ToId for NSNumber

Source§

fn to_id(self) -> id

Returns id representation of the object.
Source§

impl INSValue for NSNumber

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.