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,PartialOrd
is not implemented. -
Hash
is not implemented. Becausef32
andf64
don’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<NonZero<i128>> for Number
impl PartialEq<NonZero<i128>> for Number
source§fn eq(&self, other: &NonZeroI128) -> bool
fn eq(&self, other: &NonZeroI128) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<NonZero<i16>> for Number
impl PartialEq<NonZero<i16>> for Number
source§fn eq(&self, other: &NonZeroI16) -> bool
fn eq(&self, other: &NonZeroI16) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<NonZero<i32>> for Number
impl PartialEq<NonZero<i32>> for Number
source§fn eq(&self, other: &NonZeroI32) -> bool
fn eq(&self, other: &NonZeroI32) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<NonZero<i64>> for Number
impl PartialEq<NonZero<i64>> for Number
source§fn eq(&self, other: &NonZeroI64) -> bool
fn eq(&self, other: &NonZeroI64) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<NonZero<i8>> for Number
impl PartialEq<NonZero<i8>> for Number
source§impl PartialEq<NonZero<isize>> for Number
impl PartialEq<NonZero<isize>> for Number
source§fn eq(&self, other: &NonZeroIsize) -> bool
fn eq(&self, other: &NonZeroIsize) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<NonZero<u128>> for Number
impl PartialEq<NonZero<u128>> for Number
source§fn eq(&self, other: &NonZeroU128) -> bool
fn eq(&self, other: &NonZeroU128) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<NonZero<u16>> for Number
impl PartialEq<NonZero<u16>> for Number
source§fn eq(&self, other: &NonZeroU16) -> bool
fn eq(&self, other: &NonZeroU16) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<NonZero<u32>> for Number
impl PartialEq<NonZero<u32>> for Number
source§fn eq(&self, other: &NonZeroU32) -> bool
fn eq(&self, other: &NonZeroU32) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<NonZero<u64>> for Number
impl PartialEq<NonZero<u64>> for Number
source§fn eq(&self, other: &NonZeroU64) -> bool
fn eq(&self, other: &NonZeroU64) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<NonZero<u8>> for Number
impl PartialEq<NonZero<u8>> for Number
source§impl PartialEq<NonZero<usize>> for Number
impl PartialEq<NonZero<usize>> for Number
source§fn eq(&self, other: &NonZeroUsize) -> bool
fn eq(&self, other: &NonZeroUsize) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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 NonZeroI8
impl PartialEq<Number> for NonZeroI8
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 NonZeroU8
impl PartialEq<Number> for NonZeroU8
source§impl PartialEq<Number> for NonZeroUsize
impl PartialEq<Number> for NonZeroUsize
source§impl PartialEq<Number> for f32
impl PartialEq<Number> for f32
source§impl PartialEq<Number> for f64
impl PartialEq<Number> for f64
source§impl PartialEq<Number> for i128
impl PartialEq<Number> for i128
source§impl PartialEq<Number> for i16
impl PartialEq<Number> for i16
source§impl PartialEq<Number> for i32
impl PartialEq<Number> for i32
source§impl PartialEq<Number> for i64
impl PartialEq<Number> for i64
source§impl PartialEq<Number> for i8
impl PartialEq<Number> for i8
source§impl PartialEq<Number> for isize
impl PartialEq<Number> for isize
source§impl PartialEq<Number> for u128
impl PartialEq<Number> for u128
source§impl PartialEq<Number> for u16
impl PartialEq<Number> for u16
source§impl PartialEq<Number> for u32
impl PartialEq<Number> for u32
source§impl PartialEq<Number> for u64
impl PartialEq<Number> for u64
source§impl PartialEq<Number> for u8
impl PartialEq<Number> for u8
source§impl PartialEq<Number> for usize
impl PartialEq<Number> for usize
source§impl PartialEq<i128> for Number
impl PartialEq<i128> for Number
source§impl PartialEq<isize> for Number
impl PartialEq<isize> for Number
source§impl PartialEq<u128> for Number
impl PartialEq<u128> for Number
source§impl PartialEq<usize> for Number
impl PartialEq<usize> for Number
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