Trait ToInt
pub trait ToInt<T>
A type operator for taking a concrete integer value from a type.
It returns arbitrary integer value without explicitly specifying the type. It is useful when you pass the values to methods that accept distinct types without runtime casting.
Associated Constants
const INT: T;The concrete value for the type. Can be used in
constcontexts.
Required Methods
fn to_int() -> TMethod returning the concrete value for the type.
Implementors
impl ToInt<i16> for UTermimpl ToInt<i16> for Z0impl ToInt<i32> for UTermimpl ToInt<i32> for Z0impl ToInt<i64> for UTermimpl ToInt<i64> for Z0impl ToInt<i8> for UTermimpl ToInt<i8> for Z0impl ToInt<isize> for UTermimpl ToInt<isize> for Z0impl ToInt<u16> for UTermimpl ToInt<u32> for UTermimpl ToInt<u64> for UTermimpl ToInt<u8> for UTermimpl ToInt<usize> for UTermimpl<U> ToInt<i16> for NInt<U> where U: Unsigned + NonZero,impl<U> ToInt<i16> for PInt<U> where U: Unsigned + NonZero,impl<U> ToInt<i32> for NInt<U> where U: Unsigned + NonZero,impl<U> ToInt<i32> for PInt<U> where U: Unsigned + NonZero,impl<U> ToInt<i64> for NInt<U> where U: Unsigned + NonZero,impl<U> ToInt<i64> for PInt<U> where U: Unsigned + NonZero,impl<U> ToInt<i8> for NInt<U> where U: Unsigned + NonZero,impl<U> ToInt<i8> for PInt<U> where U: Unsigned + NonZero,impl<U> ToInt<isize> for NInt<U> where U: Unsigned + NonZero,impl<U> ToInt<isize> for PInt<U> where U: Unsigned + NonZero,impl<U, B> ToInt<i16> for UInt<U, B> where U: Unsigned, B: Bit,impl<U, B> ToInt<i32> for UInt<U, B> where U: Unsigned, B: Bit,impl<U, B> ToInt<i64> for UInt<U, B> where U: Unsigned, B: Bit,impl<U, B> ToInt<i8> for UInt<U, B> where U: Unsigned, B: Bit,impl<U, B> ToInt<isize> for UInt<U, B> where U: Unsigned, B: Bit,impl<U, B> ToInt<u16> for UInt<U, B> where U: Unsigned, B: Bit,impl<U, B> ToInt<u32> for UInt<U, B> where U: Unsigned, B: Bit,impl<U, B> ToInt<u64> for UInt<U, B> where U: Unsigned, B: Bit,impl<U, B> ToInt<u8> for UInt<U, B> where U: Unsigned, B: Bit,impl<U, B> ToInt<usize> for UInt<U, B> where U: Unsigned, B: Bit,