Trait num_traits::cast::NumCast[][src]

pub trait NumCast: Sized + ToPrimitive {
    fn from<T: ToPrimitive>(n: T) -> Option<Self>;
}

An interface for casting between machine scalars.

Required Methods

Creates a number from another value that can be converted into a primitive via the ToPrimitive trait.

Implementations on Foreign Types

impl<T: NumCast> NumCast for Wrapping<T>
[src]

Implementors