[][src]Trait mathru::algebra::abstr::cast::NumCast

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

An interface for casting between machine scalars.

Required methods

fn from<T: ToPrimitive>(n: T) -> Option<Self>

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

Loading content...

Implementations on Foreign Types

impl NumCast for u8[src]

impl NumCast for u16[src]

impl NumCast for u32[src]

impl NumCast for u64[src]

impl NumCast for usize[src]

impl NumCast for i8[src]

impl NumCast for i16[src]

impl NumCast for i32[src]

impl NumCast for i64[src]

impl NumCast for isize[src]

impl NumCast for f32[src]

impl NumCast for f64[src]

Loading content...

Implementors

impl<T> NumCast for Complex<T> where
    T: ToPrimitive + Zero + Field
[src]

An interface for casting between machine scalars.

fn from<K: ToPrimitive>(n: K) -> Option<Self>[src]

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

Loading content...