[][src]Struct der::Length

pub struct Length(_);

ASN.1-encoded length.

Limits

Presently constrained to the range 0..=65535

Implementations

impl Length[src]

pub const fn zero() -> Self[src]

Return a length of 0.

pub const fn max() -> usize[src]

Get the maximum length supported by this crate

pub fn to_usize(self) -> usize[src]

Convert length to usize

Trait Implementations

impl Add<Length> for Length[src]

type Output = Result<Self>

The resulting type after applying the + operator.

impl Add<Length> for Result<Length>[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<u16> for Length[src]

type Output = Result<Self>

The resulting type after applying the + operator.

impl Add<u8> for Length[src]

type Output = Result<Self>

The resulting type after applying the + operator.

impl Add<usize> for Length[src]

type Output = Result<Self>

The resulting type after applying the + operator.

impl Clone for Length[src]

impl Copy for Length[src]

impl Debug for Length[src]

impl<'_> Decodable<'_> for Length[src]

impl Default for Length[src]

impl Display for Length[src]

impl Encodable for Length[src]

impl Eq for Length[src]

impl From<Length> for u16[src]

impl From<Length> for usize[src]

impl From<u16> for Length[src]

impl From<u8> for Length[src]

impl Ord for Length[src]

impl PartialEq<Length> for Length[src]

impl PartialOrd<Length> for Length[src]

impl StructuralEq for Length[src]

impl StructuralPartialEq for Length[src]

impl TryFrom<usize> for Length[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.