Truncate

Trait Truncate 

Source
pub trait Truncate<T> {
    // Required method
    fn truncate(self) -> T;
}
Expand description

Safely truncate an unsigned integer value to shorter representation

Required Methods§

Source

fn truncate(self) -> T

Implementations on Foreign Types§

Source§

impl Truncate<u8> for u128

Source§

fn truncate(self) -> u8

Source§

impl Truncate<u8> for usize

Source§

fn truncate(self) -> u8

Source§

impl Truncate<u16> for u32

Source§

fn truncate(self) -> u16

Source§

impl Truncate<u16> for u128

Source§

fn truncate(self) -> u16

Source§

impl Truncate<u32> for u64

Source§

fn truncate(self) -> u32

Implementors§