Trait INSNumber

Source
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§

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

§Arguments
  • value - The value to store in the NSNumber object.
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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

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

Returns an NSNumber object containing the value.

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.

§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

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.

§Arguments
  • other - The number to compare to the number object’s value.
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.

§Arguments
  • other - The number to compare to the number object’s value.
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.

§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

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

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.

Implementors§