[][src]Enum sequoia_openpgp::packet::header::PacketLengthType

pub enum PacketLengthType {
    OneOctet,
    TwoOctets,
    FourOctets,
    Indeterminate,
}

The length encoded for an old style CTB.

The PacketLengthType is only part of the old CTB, and is partially used to determine the packet's size.

See Section 4.2.1 of RFC 4880 for more details.

Variants

OneOctet

A one-octet Body Length header encodes a length of 0 to 191 octets.

The header is 2 octets long. It contains the one byte CTB followed by the one octet length.

TwoOctets

A two-octet Body Length header encodes a length of 192 to 8383 octets.

The header is 3 octets long. It contains the one byte CTB followed by the two octet length.

FourOctets

A four-octet Body Length.

The header is 5 octets long. It contains the one byte CTB followed by the four octet length.

Indeterminate

The packet is of indeterminate length.

Neither the packet header nor the packet itself contain any information about the length. The end of the packet is clear from the context, e.g., EOF.

Trait Implementations

impl From<PacketLengthType> for u8[src]

impl Copy for PacketLengthType[src]

impl PartialEq<PacketLengthType> for PacketLengthType[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Clone for PacketLengthType[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for PacketLengthType[src]

impl TryFrom<u8> for PacketLengthType[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.

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