Trait num_traits::cast::NumCast [−][src]
An interface for casting between machine scalars.
Required methods
fn from<T: ToPrimitive>(n: T) -> Option<Self>
[src]
Creates a number from another value that can be converted into
a primitive via the ToPrimitive
trait. If the source value cannot be
represented by the target type, then None
is returned.