pub trait U128Ext {
    fn usize(self) -> Result<usize, Asn1DerError>;
fn u64(self) -> Result<u64, Asn1DerError>;
fn u32(self) -> Result<u32, Asn1DerError>;
fn u16(self) -> Result<u16, Asn1DerError>;
fn u8(self) -> Result<u8, Asn1DerError>; }
Expand description

An extension that allows you to safely convert a u128 to a smaller type

Required methods

Converts self or returns Asn1DerError::Unsupported if self is too large

Converts self or returns Asn1DerError::Unsupported if self is too large

Converts self or returns Asn1DerError::Unsupported if self is too large

Converts self or returns Asn1DerError::Unsupported if self is too large

Converts self or returns Asn1DerError::Unsupported if self is too large

Implementations on Foreign Types

Implementors