Enum asn1_cereal::tag::Len [] [src]

pub enum Len {
    Def(u64),
    Indef,
}

An enum representing the length of an ASN.1 element.

Variants

A Definite length element.

An Indefinite length element, not known before decoding.

Methods

impl Len
[src]

Given an iterator, read an indefinite length terminator.

Write an indefinite length terminator to the given writer.

Given an iterator over a byte stream, read and return the ASN.1 element length.

Write this ASN.1 length to the given writer.

A short-hand function to quickly get an Option.

Trait Implementations

impl PartialEq for Len
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for Len
[src]

Formats the value using the given formatter.

impl Clone for Len
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Len
[src]

impl From<Option<LenNum>> for Len
[src]

Performs the conversion.

impl PartialOrd<Len> for Len
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialEq<LenNum> for Len
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialOrd<LenNum> for Len
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Display for Len
[src]

Formats the value using the given formatter.