[][src]Struct ijson::INumber

#[repr(transparent)]pub struct INumber(_);

Implementations

impl INumber[src]

pub fn zero() -> Self[src]

pub fn one() -> Self[src]

pub fn to_i64(&self) -> Option<i64>[src]

Converts this number to an i64 if it can be represented exactly

pub fn to_u64(&self) -> Option<u64>[src]

Converts this number to an f64 if it can be represented exactly

pub fn to_f64(&self) -> Option<f64>[src]

Converts this number to an f64 if it can be represented exactly

pub fn to_f32(&self) -> Option<f32>[src]

Converts this number to an f32 if it can be represented exactly

pub fn to_i32(&self) -> Option<i32>[src]

Converts this number to an i32 if it can be represented exactly

pub fn to_f64_lossy(&self) -> f64[src]

pub fn to_f32_lossy(&self) -> f32[src]

pub fn has_decimal_point(&self) -> bool[src]

This allows distinguishing between 1.0 and 1 in the original JSON. Numeric operations will otherwise treat these two values as equivalent.

Trait Implementations

impl AsMut<IValue> for INumber[src]

impl AsRef<IValue> for INumber[src]

impl Borrow<IValue> for INumber[src]

impl BorrowMut<IValue> for INumber[src]

impl Clone for INumber[src]

impl Debug for INumber[src]

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

impl<'de> Deserializer<'de> for &'de INumber[src]

type Error = Error

The error type that can be returned if some error occurs during deserialization. Read more

impl Eq for INumber[src]

impl From<INumber> for IValue[src]

impl From<i16> for INumber[src]

impl From<i32> for INumber[src]

impl From<i64> for INumber[src]

impl From<i8> for INumber[src]

impl From<isize> for INumber[src]

impl From<u16> for INumber[src]

impl From<u32> for INumber[src]

impl From<u64> for INumber[src]

impl From<u8> for INumber[src]

impl From<usize> for INumber[src]

impl Hash for INumber[src]

impl Ord for INumber[src]

impl PartialEq<INumber> for INumber[src]

impl PartialOrd<INumber> for INumber[src]

impl Serialize for INumber[src]

impl<'a> TryFrom<&'a IValue> for &'a INumber[src]

type Error = ()

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a mut IValue> for &'a mut INumber[src]

type Error = ()

The type returned in the event of a conversion error.

impl TryFrom<IValue> for INumber[src]

type Error = IValue

The type returned in the event of a conversion error.

impl TryFrom<f32> for INumber[src]

type Error = ()

The type returned in the event of a conversion error.

impl TryFrom<f64> for INumber[src]

type Error = ()

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for INumber

impl Send for INumber

impl Sync for INumber

impl Unpin for INumber

impl UnwindSafe for INumber

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.