[][src]Struct rmpv::Integer

pub struct Integer { /* fields omitted */ }

Represents a MessagePack integer, whether signed or unsigned.

A Value or ValueRef that contains integer can be constructed using From trait.

Methods

impl Integer[src]

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

Returns true if the integer can be represented as i64.

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

Returns true if the integer can be represented as u64.

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

Returns the integer represented as i64 if possible, or else None.

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

Returns the integer represented as u64 if possible, or else None.

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

Returns the integer represented as f64 if possible, or else None.

Trait Implementations

impl From<u8> for Integer[src]

impl From<u16> for Integer[src]

impl From<u32> for Integer[src]

impl From<u64> for Integer[src]

impl From<usize> for Integer[src]

impl From<i8> for Integer[src]

impl From<i16> for Integer[src]

impl From<i32> for Integer[src]

impl From<i64> for Integer[src]

impl From<isize> for Integer[src]

impl Clone for Integer[src]

impl Copy for Integer[src]

impl PartialEq<Integer> for Integer[src]

impl Display for Integer[src]

impl Debug for Integer[src]

Auto Trait Implementations

impl Send for Integer

impl Sync for Integer

impl Unpin for Integer

impl UnwindSafe for Integer

impl RefUnwindSafe for Integer

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.

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

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

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