Trait rocket::mtls::x509::der_parser::asn1_rs::nom::ToUsize

source ·
pub trait ToUsize {
    // Required method
    fn to_usize(&self) -> usize;
}
Available on crate feature mtls only.
Expand description

Helper trait to convert numbers to usize.

By default, usize implements From<u8> and From<u16> but not From<u32> and From<u64> because that would be invalid on some platforms. This trait implements the conversion for platforms with 32 and 64 bits pointer platforms

Required Methods§

source

fn to_usize(&self) -> usize

converts self to usize

Implementations on Foreign Types§

source§

impl ToUsize for u8

source§

fn to_usize(&self) -> usize

source§

impl ToUsize for u16

source§

fn to_usize(&self) -> usize

source§

impl ToUsize for u32

source§

fn to_usize(&self) -> usize

source§

impl ToUsize for u64

source§

fn to_usize(&self) -> usize

source§

impl ToUsize for usize

source§

fn to_usize(&self) -> usize

Implementors§