pub trait CastFromPrimitive<T>: Copy + 'static {
    // Required method
    fn cast_from(v: T) -> Self;
}
Expand description

Trait for casting between primitive types.

Required Methods§

source

fn cast_from(v: T) -> Self

Casts the given value into Self.

Implementations on Foreign Types§

source§

impl CastFromPrimitive<isize> for u8

source§

impl CastFromPrimitive<i64> for i16

source§

impl CastFromPrimitive<u64> for i32

source§

impl<T> CastFromPrimitive<T> for u32where T: RegisteredPrimitive,

source§

impl CastFromPrimitive<u64> for u16

source§

impl CastFromPrimitive<isize> for u16

source§

impl CastFromPrimitive<i8> for u8

source§

impl<T> CastFromPrimitive<T> for u16where T: RegisteredPrimitive,

source§

impl<T> CastFromPrimitive<T> for i16where T: RegisteredPrimitive,

source§

impl CastFromPrimitive<isize> for i32

source§

impl CastFromPrimitive<u32> for u16

source§

impl CastFromPrimitive<u64> for u8

source§

impl CastFromPrimitive<u32> for i32

source§

impl CastFromPrimitive<usize> for u8

source§

impl CastFromPrimitive<i64> for u16

source§

impl CastFromPrimitive<isize> for i16

source§

impl<T> CastFromPrimitive<T> for i32where T: RegisteredPrimitive,

source§

impl CastFromPrimitive<u32> for i16

source§

impl CastFromPrimitive<i64> for u8

source§

impl CastFromPrimitive<usize> for i32

source§

impl CastFromPrimitive<i64> for i32

source§

impl CastFromPrimitive<u64> for i16

source§

impl CastFromPrimitive<u32> for u8

source§

impl CastFromPrimitive<i8> for i16

source§

impl CastFromPrimitive<i8> for u16

source§

impl CastFromPrimitive<i8> for i32

source§

impl CastFromPrimitive<usize> for u16

source§

impl CastFromPrimitive<usize> for i16

source§

impl<T> CastFromPrimitive<T> for u8where T: RegisteredPrimitive,

source§

fn cast_from(v: T) -> u8

Implementors§