[−][src]Struct sj::Number
Number
You rarely use this directly, but Value
.
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,PartialEq
andPartialOrd
are not implemented. Hash
is not implemented. Becausef32
andf64
don't implement it.
Trait Implementations
impl Clone for Number
[src]
impl Debug for Number
[src]
impl Display for Number
[src]
impl From<Number> for Value
[src]
impl From<f32> for Number
[src]
impl From<f64> for Number
[src]
impl From<i128> for Number
[src]
impl From<i16> for Number
[src]
impl From<i32> for Number
[src]
impl From<i64> for Number
[src]
impl From<i8> for Number
[src]
impl From<isize> for Number
[src]
impl From<u128> for Number
[src]
impl From<u16> for Number
[src]
impl From<u32> for Number
[src]
impl From<u64> for Number
[src]
impl From<u8> for Number
[src]
impl From<usize> for Number
[src]
impl<'_> TryFrom<&'_ Number> for i8
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: &Number) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ Number> for i16
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: &Number) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ Number> for u128
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: &Number) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ Number> for usize
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: &Number) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ Number> for f32
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: &Number) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ Number> for f64
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: &Number) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ Number> for i32
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: &Number) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ Number> for i64
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: &Number) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ Number> for i128
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: &Number) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ Number> for isize
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: &Number) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ Number> for u8
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: &Number) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ Number> for u16
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: &Number) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ Number> for u32
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: &Number) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<&'_ Number> for u64
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: &Number) -> Result<Self, Self::Error>
[src]
impl TryFrom<Number> for i8
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: Number) -> Result<Self, Self::Error>
[src]
impl TryFrom<Number> for i16
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: Number) -> Result<Self, Self::Error>
[src]
impl TryFrom<Number> for u128
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: Number) -> Result<Self, Self::Error>
[src]
impl TryFrom<Number> for usize
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: Number) -> Result<Self, Self::Error>
[src]
impl TryFrom<Number> for f32
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: Number) -> Result<Self, Self::Error>
[src]
impl TryFrom<Number> for f64
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: Number) -> Result<Self, Self::Error>
[src]
impl TryFrom<Number> for i32
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: Number) -> Result<Self, Self::Error>
[src]
impl TryFrom<Number> for i64
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: Number) -> Result<Self, Self::Error>
[src]
impl TryFrom<Number> for i128
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: Number) -> Result<Self, Self::Error>
[src]
impl TryFrom<Number> for isize
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: Number) -> Result<Self, Self::Error>
[src]
impl TryFrom<Number> for u8
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: Number) -> Result<Self, Self::Error>
[src]
impl TryFrom<Number> for u16
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: Number) -> Result<Self, Self::Error>
[src]
impl TryFrom<Number> for u32
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(n: Number) -> Result<Self, Self::Error>
[src]
impl TryFrom<Number> for u64
[src]
Auto Trait Implementations
impl RefUnwindSafe for Number
impl Send for Number
impl Sync for Number
impl Unpin for Number
impl UnwindSafe for Number
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,