pub struct Number { /* private fields */ }Expand description
§Number
You rarely use this directly, but Json.
§Notes
-
Internally, this struct uses an enum to store values of different types (such as
i64,f64…). Since different number types cannot be compared directly,PartialOrdis not implemented. -
Hashis not implemented. Becausef32andf64don’t implement it.
Trait Implementations§
Source§impl From<&NonZero<i128>> for Number
impl From<&NonZero<i128>> for Number
Source§fn from(n: &NonZeroI128) -> Self
fn from(n: &NonZeroI128) -> Self
Converts to this type from the input type.
Source§impl From<&NonZero<i16>> for Number
impl From<&NonZero<i16>> for Number
Source§fn from(n: &NonZeroI16) -> Self
fn from(n: &NonZeroI16) -> Self
Converts to this type from the input type.
Source§impl From<&NonZero<i32>> for Number
impl From<&NonZero<i32>> for Number
Source§fn from(n: &NonZeroI32) -> Self
fn from(n: &NonZeroI32) -> Self
Converts to this type from the input type.
Source§impl From<&NonZero<i64>> for Number
impl From<&NonZero<i64>> for Number
Source§fn from(n: &NonZeroI64) -> Self
fn from(n: &NonZeroI64) -> Self
Converts to this type from the input type.
Source§impl From<&NonZero<isize>> for Number
impl From<&NonZero<isize>> for Number
Source§fn from(n: &NonZeroIsize) -> Self
fn from(n: &NonZeroIsize) -> Self
Converts to this type from the input type.
Source§impl From<&NonZero<u128>> for Number
impl From<&NonZero<u128>> for Number
Source§fn from(n: &NonZeroU128) -> Self
fn from(n: &NonZeroU128) -> Self
Converts to this type from the input type.
Source§impl From<&NonZero<u16>> for Number
impl From<&NonZero<u16>> for Number
Source§fn from(n: &NonZeroU16) -> Self
fn from(n: &NonZeroU16) -> Self
Converts to this type from the input type.
Source§impl From<&NonZero<u32>> for Number
impl From<&NonZero<u32>> for Number
Source§fn from(n: &NonZeroU32) -> Self
fn from(n: &NonZeroU32) -> Self
Converts to this type from the input type.
Source§impl From<&NonZero<u64>> for Number
impl From<&NonZero<u64>> for Number
Source§fn from(n: &NonZeroU64) -> Self
fn from(n: &NonZeroU64) -> Self
Converts to this type from the input type.
Source§impl From<&NonZero<usize>> for Number
impl From<&NonZero<usize>> for Number
Source§fn from(n: &NonZeroUsize) -> Self
fn from(n: &NonZeroUsize) -> Self
Converts to this type from the input type.
Source§impl From<NonZero<i128>> for Number
impl From<NonZero<i128>> for Number
Source§fn from(n: NonZeroI128) -> Self
fn from(n: NonZeroI128) -> Self
Converts to this type from the input type.
Source§impl From<NonZero<i16>> for Number
impl From<NonZero<i16>> for Number
Source§fn from(n: NonZeroI16) -> Self
fn from(n: NonZeroI16) -> Self
Converts to this type from the input type.
Source§impl From<NonZero<i32>> for Number
impl From<NonZero<i32>> for Number
Source§fn from(n: NonZeroI32) -> Self
fn from(n: NonZeroI32) -> Self
Converts to this type from the input type.
Source§impl From<NonZero<i64>> for Number
impl From<NonZero<i64>> for Number
Source§fn from(n: NonZeroI64) -> Self
fn from(n: NonZeroI64) -> Self
Converts to this type from the input type.
Source§impl From<NonZero<isize>> for Number
impl From<NonZero<isize>> for Number
Source§fn from(n: NonZeroIsize) -> Self
fn from(n: NonZeroIsize) -> Self
Converts to this type from the input type.
Source§impl From<NonZero<u128>> for Number
impl From<NonZero<u128>> for Number
Source§fn from(n: NonZeroU128) -> Self
fn from(n: NonZeroU128) -> Self
Converts to this type from the input type.
Source§impl From<NonZero<u16>> for Number
impl From<NonZero<u16>> for Number
Source§fn from(n: NonZeroU16) -> Self
fn from(n: NonZeroU16) -> Self
Converts to this type from the input type.
Source§impl From<NonZero<u32>> for Number
impl From<NonZero<u32>> for Number
Source§fn from(n: NonZeroU32) -> Self
fn from(n: NonZeroU32) -> Self
Converts to this type from the input type.
Source§impl From<NonZero<u64>> for Number
impl From<NonZero<u64>> for Number
Source§fn from(n: NonZeroU64) -> Self
fn from(n: NonZeroU64) -> Self
Converts to this type from the input type.
Source§impl From<NonZero<usize>> for Number
impl From<NonZero<usize>> for Number
Source§fn from(n: NonZeroUsize) -> Self
fn from(n: NonZeroUsize) -> Self
Converts to this type from the input type.
Source§impl PartialEq<Number> for NonZeroI128
impl PartialEq<Number> for NonZeroI128
Source§impl PartialEq<Number> for NonZeroI16
impl PartialEq<Number> for NonZeroI16
Source§impl PartialEq<Number> for NonZeroI32
impl PartialEq<Number> for NonZeroI32
Source§impl PartialEq<Number> for NonZeroI64
impl PartialEq<Number> for NonZeroI64
Source§impl PartialEq<Number> for NonZeroIsize
impl PartialEq<Number> for NonZeroIsize
Source§impl PartialEq<Number> for NonZeroU128
impl PartialEq<Number> for NonZeroU128
Source§impl PartialEq<Number> for NonZeroU16
impl PartialEq<Number> for NonZeroU16
Source§impl PartialEq<Number> for NonZeroU32
impl PartialEq<Number> for NonZeroU32
Source§impl PartialEq<Number> for NonZeroU64
impl PartialEq<Number> for NonZeroU64
Source§impl PartialEq<Number> for NonZeroUsize
impl PartialEq<Number> for NonZeroUsize
Source§impl TryFrom<&Number> for NonZeroI128
impl TryFrom<&Number> for NonZeroI128
Source§impl TryFrom<&Number> for NonZeroI16
impl TryFrom<&Number> for NonZeroI16
Source§impl TryFrom<&Number> for NonZeroI32
impl TryFrom<&Number> for NonZeroI32
Source§impl TryFrom<&Number> for NonZeroI64
impl TryFrom<&Number> for NonZeroI64
Source§impl TryFrom<&Number> for NonZeroIsize
impl TryFrom<&Number> for NonZeroIsize
Source§impl TryFrom<&Number> for NonZeroU128
impl TryFrom<&Number> for NonZeroU128
Source§impl TryFrom<&Number> for NonZeroU16
impl TryFrom<&Number> for NonZeroU16
Source§impl TryFrom<&Number> for NonZeroU32
impl TryFrom<&Number> for NonZeroU32
Source§impl TryFrom<&Number> for NonZeroU64
impl TryFrom<&Number> for NonZeroU64
Source§impl TryFrom<&Number> for NonZeroUsize
impl TryFrom<&Number> for NonZeroUsize
Source§impl TryFrom<Number> for NonZeroI128
impl TryFrom<Number> for NonZeroI128
Source§impl TryFrom<Number> for NonZeroI16
impl TryFrom<Number> for NonZeroI16
Source§impl TryFrom<Number> for NonZeroI32
impl TryFrom<Number> for NonZeroI32
Source§impl TryFrom<Number> for NonZeroI64
impl TryFrom<Number> for NonZeroI64
Source§impl TryFrom<Number> for NonZeroIsize
impl TryFrom<Number> for NonZeroIsize
Source§impl TryFrom<Number> for NonZeroU128
impl TryFrom<Number> for NonZeroU128
Source§impl TryFrom<Number> for NonZeroU16
impl TryFrom<Number> for NonZeroU16
Source§impl TryFrom<Number> for NonZeroU32
impl TryFrom<Number> for NonZeroU32
Source§impl TryFrom<Number> for NonZeroU64
impl TryFrom<Number> for NonZeroU64
Source§impl TryFrom<Number> for NonZeroUsize
impl TryFrom<Number> for NonZeroUsize
impl Copy for Number
Auto Trait Implementations§
impl Freeze for Number
impl RefUnwindSafe for Number
impl Send for Number
impl Sync for Number
impl Unpin for Number
impl UnwindSafe for Number
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more