Enum sequoia_openpgp::packet::header::PacketLengthType
source · 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§
source§impl Clone for PacketLengthType
impl Clone for PacketLengthType
source§fn clone(&self) -> PacketLengthType
fn clone(&self) -> PacketLengthType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PacketLengthType
impl Debug for PacketLengthType
source§impl From<PacketLengthType> for u8
impl From<PacketLengthType> for u8
source§fn from(l: PacketLengthType) -> Self
fn from(l: PacketLengthType) -> Self
source§impl PartialEq for PacketLengthType
impl PartialEq for PacketLengthType
source§fn eq(&self, other: &PacketLengthType) -> bool
fn eq(&self, other: &PacketLengthType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<u8> for PacketLengthType
impl TryFrom<u8> for PacketLengthType
impl Copy for PacketLengthType
impl StructuralPartialEq for PacketLengthType
Auto Trait Implementations§
impl Freeze for PacketLengthType
impl RefUnwindSafe for PacketLengthType
impl Send for PacketLengthType
impl Sync for PacketLengthType
impl Unpin for PacketLengthType
impl UnwindSafe for PacketLengthType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)