Enum serde_lite::Number[][src]

pub enum Number {
    Float(f64),
    SignedInt(i64),
    UnsignedInt(u64),
}

Number.

Variants

Float(f64)
SignedInt(i64)
UnsignedInt(u64)

Implementations

impl Number[src]

pub fn as_f64(self) -> f64[src]

Get the number as an f64 number.

pub fn as_i64(self) -> Result<i64, Error>[src]

Get the number as an i64 number if possible.

pub fn as_u64(self) -> Result<u64, Error>[src]

Get the number as a u64 number if possible.

Trait Implementations

impl Clone for Number[src]

impl Copy for Number[src]

impl Debug for Number[src]

impl<'de> Deserialize<'de> for Number[src]

impl From<Number> for Intermediate[src]

impl Serialize for Number[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.