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

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.