Trait libipld::cid::multihash::typenum::ToInt[]

pub trait ToInt<T> {
    fn to_int() -> T;
}
Expand description

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.

Required methods

fn to_int() -> T

Method returning the concrete value for the type.

Implementors

impl ToInt<i8> for UTerm

pub fn to_int() -> i8

impl ToInt<i8> for Z0

pub fn to_int() -> i8

impl ToInt<i16> for UTerm

pub fn to_int() -> i16

impl ToInt<i16> for Z0

pub fn to_int() -> i16

impl ToInt<i32> for UTerm

pub fn to_int() -> i32

impl ToInt<i32> for Z0

pub fn to_int() -> i32

impl ToInt<i64> for UTerm

pub fn to_int() -> i64

impl ToInt<i64> for Z0

pub fn to_int() -> i64

impl ToInt<u8> for UTerm

pub fn to_int() -> u8

impl ToInt<u16> for UTerm

pub fn to_int() -> u16

impl ToInt<u32> for UTerm

pub fn to_int() -> u32

impl ToInt<u64> for UTerm

pub fn to_int() -> u64

impl ToInt<usize> for UTerm

pub fn to_int() -> usize

impl<U> ToInt<i8> for NInt<U> where
    U: Unsigned + NonZero

pub fn to_int() -> i8

impl<U> ToInt<i8> for PInt<U> where
    U: Unsigned + NonZero

pub fn to_int() -> i8

impl<U> ToInt<i16> for NInt<U> where
    U: Unsigned + NonZero

pub fn to_int() -> i16

impl<U> ToInt<i16> for PInt<U> where
    U: Unsigned + NonZero

pub fn to_int() -> i16

impl<U> ToInt<i32> for NInt<U> where
    U: Unsigned + NonZero

pub fn to_int() -> i32

impl<U> ToInt<i32> for PInt<U> where
    U: Unsigned + NonZero

pub fn to_int() -> i32

impl<U> ToInt<i64> for NInt<U> where
    U: Unsigned + NonZero

pub fn to_int() -> i64

impl<U> ToInt<i64> for PInt<U> where
    U: Unsigned + NonZero

pub fn to_int() -> i64

impl<U, B> ToInt<i8> for UInt<U, B> where
    U: Unsigned,
    B: Bit

pub fn to_int() -> i8

impl<U, B> ToInt<i16> for UInt<U, B> where
    U: Unsigned,
    B: Bit

pub fn to_int() -> i16

impl<U, B> ToInt<i32> for UInt<U, B> where
    U: Unsigned,
    B: Bit

pub fn to_int() -> i32

impl<U, B> ToInt<i64> for UInt<U, B> where
    U: Unsigned,
    B: Bit

pub fn to_int() -> i64

impl<U, B> ToInt<u8> for UInt<U, B> where
    U: Unsigned,
    B: Bit

pub fn to_int() -> u8

impl<U, B> ToInt<u16> for UInt<U, B> where
    U: Unsigned,
    B: Bit

pub fn to_int() -> u16

impl<U, B> ToInt<u32> for UInt<U, B> where
    U: Unsigned,
    B: Bit

pub fn to_int() -> u32

impl<U, B> ToInt<u64> for UInt<U, B> where
    U: Unsigned,
    B: Bit

pub fn to_int() -> u64

impl<U, B> ToInt<usize> for UInt<U, B> where
    U: Unsigned,
    B: Bit

pub fn to_int() -> usize