pub trait INSNumber: INSValue {
Show 52 methods
// Provided methods
fn m_number_with_bool(value: bool) -> Self
where Self: Sized + 'static + FromId { ... }
fn m_number_with_char(value: c_schar) -> Self
where Self: Sized + FromId { ... }
fn m_number_with_double(value: c_double) -> Self
where Self: Sized + FromId { ... }
fn m_number_with_float(value: c_float) -> Self
where Self: Sized + FromId { ... }
fn m_number_with_int(value: c_int) -> Self
where Self: Sized + FromId { ... }
fn m_number_with_integer(value: Int) -> Self
where Self: Sized + FromId { ... }
fn m_number_with_long(value: c_long) -> Self
where Self: Sized + FromId { ... }
fn m_number_with_long_long(value: c_longlong) -> Self
where Self: Sized + FromId { ... }
fn m_number_with_short(value: c_short) -> Self
where Self: Sized + FromId { ... }
fn m_number_with_unsigned_char(value: c_uchar) -> Self
where Self: Sized + FromId { ... }
fn m_number_with_unsigned_int(value: c_uint) -> Self
where Self: Sized + FromId { ... }
fn m_number_with_unsigned_integer(value: UInt) -> Self
where Self: Sized + FromId { ... }
fn m_number_with_unsigned_long(value: c_ulong) -> Self
where Self: Sized + FromId { ... }
fn m_number_with_unsigned_long_long(value: c_ulonglong) -> Self
where Self: Sized + FromId { ... }
fn m_number_with_unsigned_short(value: c_ushort) -> Self
where Self: Sized + FromId { ... }
fn m_init_with_bool(&mut self, value: bool) -> Self
where Self: Sized + FromId { ... }
fn m_init_with_char(&mut self, value: c_schar) -> Self
where Self: Sized + FromId { ... }
fn m_init_with_double(&mut self, value: c_double) -> Self
where Self: Sized + FromId { ... }
fn m_init_with_float(&mut self, value: c_float) -> Self
where Self: Sized + FromId { ... }
fn m_init_with_int(&mut self, value: c_int) -> Self
where Self: Sized + FromId { ... }
fn m_init_with_integer(&mut self, value: Int) -> Self
where Self: Sized + FromId { ... }
fn m_init_with_long(&mut self, value: c_long) -> Self
where Self: Sized + FromId { ... }
fn m_init_with_long_long(&mut self, value: c_longlong) -> Self
where Self: Sized + FromId { ... }
fn m_init_with_short(&mut self, value: c_short) -> Self
where Self: Sized + FromId { ... }
fn m_init_with_unsigned_char(&mut self, value: c_uchar) -> Self
where Self: Sized + FromId { ... }
fn m_init_with_unsigned_int(&mut self, value: c_uint) -> Self
where Self: Sized + FromId { ... }
fn m_init_with_unsigned_integer(&mut self, value: c_uint) -> Self
where Self: Sized + FromId { ... }
fn m_init_with_unsigned_long(&mut self, value: c_ulong) -> Self
where Self: Sized + FromId { ... }
fn m_init_with_unsigned_long_long(&mut self, value: c_ulonglong) -> Self
where Self: Sized + FromId { ... }
fn m_init_with_unsigned_short(&mut self, value: c_ushort) -> Self
where Self: Sized + FromId { ... }
fn p_bool_value(&self) -> bool { ... }
fn p_char_value(&self) -> c_schar { ... }
fn p_decimal_value(&self) -> NSDecimal { ... }
fn p_double_value(&self) -> c_double { ... }
fn p_float_value(&self) -> c_float { ... }
fn p_int_value(&self) -> c_int { ... }
fn p_integer_value(&self) -> Int { ... }
fn p_long_long_value(&self) -> c_longlong { ... }
fn p_long_value(&self) -> c_long { ... }
fn p_short_value(&self) -> c_short { ... }
fn p_unsigned_char_value(&self) -> c_uchar { ... }
fn p_unsigned_integer_value(&self) -> UInt { ... }
fn p_unsigned_int_value(&self) -> c_uint { ... }
fn p_unsigned_long_long_value(&self) -> c_ulonglong { ... }
fn p_unsigned_long_value(&self) -> c_ulong { ... }
fn p_unsigned_short_value(&self) -> c_ushort { ... }
fn m_description_with_locale(&self, locale: &NSLocale) -> NSString { ... }
fn p_string_value(&self) -> NSString { ... }
fn m_compare(&self, other: &Self) -> NSComparisonResult { ... }
fn m_is_equal_to_number(&self, other: &Self) -> bool { ... }
fn m_objc_type(&self) -> *const char { ... }
fn m_init_with_coder(&mut self, coder: &NSCoder) -> Self
where Self: Sized + FromId { ... }
}
Expand description
A trait containing all the methods for NSNumber
Provided Methods§
Sourcefn m_number_with_bool(value: bool) -> Self
fn m_number_with_bool(value: bool) -> Self
Sourcefn m_number_with_char(value: c_schar) -> Self
fn m_number_with_char(value: c_schar) -> Self
Sourcefn m_number_with_double(value: c_double) -> Self
fn m_number_with_double(value: c_double) -> Self
Sourcefn m_number_with_float(value: c_float) -> Self
fn m_number_with_float(value: c_float) -> Self
Sourcefn m_number_with_int(value: c_int) -> Self
fn m_number_with_int(value: c_int) -> Self
Sourcefn m_number_with_integer(value: Int) -> Self
fn m_number_with_integer(value: Int) -> Self
Sourcefn m_number_with_long(value: c_long) -> Self
fn m_number_with_long(value: c_long) -> Self
Sourcefn m_number_with_long_long(value: c_longlong) -> Self
fn m_number_with_long_long(value: c_longlong) -> Self
Sourcefn m_number_with_short(value: c_short) -> Self
fn m_number_with_short(value: c_short) -> Self
Sourcefn m_number_with_unsigned_char(value: c_uchar) -> Self
fn m_number_with_unsigned_char(value: c_uchar) -> Self
Sourcefn m_number_with_unsigned_int(value: c_uint) -> Self
fn m_number_with_unsigned_int(value: c_uint) -> Self
Sourcefn m_number_with_unsigned_integer(value: UInt) -> Self
fn m_number_with_unsigned_integer(value: UInt) -> Self
Sourcefn m_number_with_unsigned_long(value: c_ulong) -> Self
fn m_number_with_unsigned_long(value: c_ulong) -> Self
Sourcefn m_number_with_unsigned_long_long(value: c_ulonglong) -> Self
fn m_number_with_unsigned_long_long(value: c_ulonglong) -> Self
Sourcefn m_number_with_unsigned_short(value: c_ushort) -> Self
fn m_number_with_unsigned_short(value: c_ushort) -> Self
Sourcefn m_init_with_bool(&mut self, value: bool) -> Self
fn m_init_with_bool(&mut self, value: bool) -> Self
Returns an NSNumber object initialized to contain a given value, treated as a BOOL.
§Arguments
value
- The value to store in the NSNumber object.
Sourcefn m_init_with_char(&mut self, value: c_schar) -> Self
fn m_init_with_char(&mut self, value: c_schar) -> Self
Sourcefn m_init_with_double(&mut self, value: c_double) -> Self
fn m_init_with_double(&mut self, value: c_double) -> Self
Sourcefn m_init_with_float(&mut self, value: c_float) -> Self
fn m_init_with_float(&mut self, value: c_float) -> Self
Sourcefn m_init_with_int(&mut self, value: c_int) -> Self
fn m_init_with_int(&mut self, value: c_int) -> Self
Sourcefn m_init_with_integer(&mut self, value: Int) -> Self
fn m_init_with_integer(&mut self, value: Int) -> Self
Sourcefn m_init_with_long(&mut self, value: c_long) -> Self
fn m_init_with_long(&mut self, value: c_long) -> Self
Sourcefn m_init_with_long_long(&mut self, value: c_longlong) -> Self
fn m_init_with_long_long(&mut self, value: c_longlong) -> Self
Sourcefn m_init_with_short(&mut self, value: c_short) -> Self
fn m_init_with_short(&mut self, value: c_short) -> Self
Sourcefn m_init_with_unsigned_char(&mut self, value: c_uchar) -> Self
fn m_init_with_unsigned_char(&mut self, value: c_uchar) -> Self
Sourcefn m_init_with_unsigned_int(&mut self, value: c_uint) -> Self
fn m_init_with_unsigned_int(&mut self, value: c_uint) -> Self
Sourcefn m_init_with_unsigned_integer(&mut self, value: c_uint) -> Self
fn m_init_with_unsigned_integer(&mut self, value: c_uint) -> Self
Sourcefn m_init_with_unsigned_long(&mut self, value: c_ulong) -> Self
fn m_init_with_unsigned_long(&mut self, value: c_ulong) -> Self
Sourcefn m_init_with_unsigned_long_long(&mut self, value: c_ulonglong) -> Self
fn m_init_with_unsigned_long_long(&mut self, value: c_ulonglong) -> Self
Sourcefn m_init_with_unsigned_short(&mut self, value: c_ushort) -> Self
fn m_init_with_unsigned_short(&mut self, value: c_ushort) -> Self
Sourcefn p_bool_value(&self) -> bool
fn p_bool_value(&self) -> bool
The number object’s value expressed as a Boolean value.
Sourcefn p_char_value(&self) -> c_schar
fn p_char_value(&self) -> c_schar
The number object’s value expressed as a char.
Sourcefn p_decimal_value(&self) -> NSDecimal
fn p_decimal_value(&self) -> NSDecimal
The number object’s value expressed as an NSDecimal structure.
Sourcefn p_double_value(&self) -> c_double
fn p_double_value(&self) -> c_double
The number object’s value expressed as a double, converted as necessary.
Sourcefn p_float_value(&self) -> c_float
fn p_float_value(&self) -> c_float
The number object’s value expressed as a float, converted as necessary.
Sourcefn p_int_value(&self) -> c_int
fn p_int_value(&self) -> c_int
The number object’s value expressed as an int, converted as necessary.
Sourcefn p_integer_value(&self) -> Int
fn p_integer_value(&self) -> Int
The number object’s value expressed as an NSInteger object, converted as necessary.
Sourcefn p_long_long_value(&self) -> c_longlong
fn p_long_long_value(&self) -> c_longlong
The number object’s value expressed as a long long, converted as necessary.
Sourcefn p_long_value(&self) -> c_long
fn p_long_value(&self) -> c_long
The number object’s value expressed as a long, converted as necessary.
Sourcefn p_short_value(&self) -> c_short
fn p_short_value(&self) -> c_short
The number object’s value expressed as a short, converted as necessary.
Sourcefn p_unsigned_char_value(&self) -> c_uchar
fn p_unsigned_char_value(&self) -> c_uchar
The number object’s value expressed as an unsigned char, converted as necessary.
Sourcefn p_unsigned_integer_value(&self) -> UInt
fn p_unsigned_integer_value(&self) -> UInt
The number object’s value expressed as an NSUInteger object, converted as necessary.
Sourcefn p_unsigned_int_value(&self) -> c_uint
fn p_unsigned_int_value(&self) -> c_uint
The number object’s value expressed as an unsigned int, converted as necessary.
Sourcefn p_unsigned_long_long_value(&self) -> c_ulonglong
fn p_unsigned_long_long_value(&self) -> c_ulonglong
The number object’s value expressed as an unsigned long long, converted as necessary.
Sourcefn p_unsigned_long_value(&self) -> c_ulong
fn p_unsigned_long_value(&self) -> c_ulong
The number object’s value expressed as an unsigned long, converted as necessary.
Sourcefn p_unsigned_short_value(&self) -> c_ushort
fn p_unsigned_short_value(&self) -> c_ushort
The number object’s value expressed as an unsigned short, converted as necessary.
Sourcefn m_description_with_locale(&self, locale: &NSLocale) -> NSString
fn m_description_with_locale(&self, locale: &NSLocale) -> NSString
Sourcefn p_string_value(&self) -> NSString
fn p_string_value(&self) -> NSString
The number object’s value expressed as a human-readable string.
Sourcefn m_compare(&self, other: &Self) -> NSComparisonResult
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.
§Arguments
other
- The number to compare to the number object’s value.
Sourcefn m_is_equal_to_number(&self, other: &Self) -> bool
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.
§Arguments
other
- The number to compare to the number object’s value.
Sourcefn m_objc_type(&self) -> *const char
fn m_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.
Sourcefn m_init_with_coder(&mut self, coder: &NSCoder) -> Self
fn m_init_with_coder(&mut self, coder: &NSCoder) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.