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

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

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 NumCast for f64
[src]

[src]

impl NumCast for u64
[src]

[src]

impl NumCast for i64
[src]

[src]

impl NumCast for i8
[src]

[src]

impl NumCast for f32
[src]

[src]

impl NumCast for u16
[src]

[src]

impl NumCast for i32
[src]

[src]

impl NumCast for isize
[src]

[src]

impl NumCast for usize
[src]

[src]

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

[src]

impl NumCast for u8
[src]

[src]

impl NumCast for i16
[src]

[src]

impl NumCast for u32
[src]

[src]

Implementors