[][src]Trait easy_ml::numeric::FromUsize

pub trait FromUsize: Sized {
    fn from_usize(n: usize) -> Option<Self>;
}

Specifies how to obtain an instance of this numeric type equal to the usize primitive. If the number is too large to represent in this type, None should be returned instead.

The boilerplate implementations for primitives is performed with a macro. If a primitive type is missing from this list, please open an issue to add it in.

Required methods

fn from_usize(n: usize) -> Option<Self>

Loading content...

Implementations on Foreign Types

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

impl FromUsize for u8[src]

impl FromUsize for i8[src]

impl FromUsize for u16[src]

impl FromUsize for i16[src]

impl FromUsize for u32[src]

impl FromUsize for i32[src]

impl FromUsize for u64[src]

impl FromUsize for i64[src]

impl FromUsize for u128[src]

impl FromUsize for i128[src]

impl FromUsize for f32[src]

impl FromUsize for f64[src]

impl FromUsize for usize[src]

impl FromUsize for isize[src]

Loading content...

Implementors

Loading content...