ToUsize

Trait ToUsize 

Source
pub trait ToUsize {
    // Required method
    fn to_usize(self) -> usize;
}
Expand description

A trait to indicate a type can be infallibly converted to usize. This should only be implemented for infallible conversions, so only unsigned types are valid.

Required Methods§

Source

fn to_usize(self) -> usize

Implementations on Foreign Types§

Source§

impl ToUsize for u8

Source§

impl ToUsize for u16

Source§

impl ToUsize for u32

Implementors§