ToU128

Trait ToU128 

Source
pub trait ToU128 {
    // Required method
    fn to_u128(&self) -> u128;
}
Expand description

Trait defining instance method to_u128() : u128 that provides a no-cost or low-cost conversion into u128.

It is expected that the implementing type “is-a” u128 in a logical manner.

§Additional Implementations on Foreign Types

§Built-in Types

If the feature "implement-ToU128-for-built_ins" is defined (as it is by "default"), then this is also implemented for the following type(s):

Required Methods§

Source

fn to_u128(&self) -> u128

Implementations on Foreign Types§

Source§

impl ToU128 for u8

Source§

fn to_u128(&self) -> u128

Source§

impl ToU128 for u16

Source§

fn to_u128(&self) -> u128

Source§

impl ToU128 for u32

Source§

fn to_u128(&self) -> u128

Source§

impl ToU128 for u64

Source§

fn to_u128(&self) -> u128

Source§

impl ToU128 for u128

Source§

fn to_u128(&self) -> u128

Source§

impl<T: ToU128 + ?Sized> ToU128 for Box<T>

Available on non-crate feature nostd only.
Source§

fn to_u128(&self) -> u128

Source§

impl<T: ToU128 + ?Sized> ToU128 for Rc<T>

Available on non-crate feature nostd only.
Source§

fn to_u128(&self) -> u128

Implementors§