[][src]Struct fog_pack::Integer

pub struct Integer { /* fields omitted */ }

Represents a fog-pack integer, whether signed or unsigned.

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

Implementations

impl Integer[src]

pub fn min_value() -> Integer[src]

Minimum possible integer that can be represented. Equivalent to i64::min_value().

pub fn max_value() -> Integer[src]

Maximum possible integer that can be represented. Equivalent to u64::max_value().

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.

pub fn as_bits(&self) -> u64[src]

Forcibly casts the value to u64 without modification.

Trait Implementations

impl Add<i64> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl Clone for Integer[src]

impl Copy for Integer[src]

impl Debug for Integer[src]

impl Display for Integer[src]

impl Eq for Integer[src]

impl From<Integer> for Value[src]

impl From<i16> for Integer[src]

impl From<i32> for Integer[src]

impl From<i64> for Integer[src]

impl From<i8> for Integer[src]

impl From<isize> for Integer[src]

impl From<u16> for Integer[src]

impl From<u32> for Integer[src]

impl From<u64> for Integer[src]

impl From<u8> for Integer[src]

impl From<usize> for Integer[src]

impl LowerHex for Integer[src]

impl Ord for Integer[src]

impl PartialEq<Integer> for Integer[src]

impl PartialOrd<Integer> for Integer[src]

impl StructuralEq for Integer[src]

impl StructuralPartialEq for Integer[src]

impl Sub<i64> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl UpperHex for Integer[src]

Auto Trait Implementations

impl RefUnwindSafe for Integer

impl Send for Integer

impl Sync for Integer

impl Unpin for Integer

impl UnwindSafe for Integer

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> 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> 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.