Enum sequoia_openpgp::packet::header::BodyLength [−][src]
Expand description
A packet’s size.
A packet’s size can be expressed in three different ways. Either
the size of the packet is fully known (Full), the packet is
chunked using OpenPGP’s partial body encoding (Partial), or the
packet extends to the end of the file (Indeterminate). See
Section 4.2 of RFC 4880 for more details.
Variants
Full(u32)The packet’s size is known.
Tuple Fields of Full
0: u32Partial(u32)The parameter is the number of bytes in the current chunk.
This type is only used with new format packets.
Tuple Fields of Partial
0: u32The packet extends until an EOF is encountered.
This type is only used with old format packets.
Implementations
Emits the length encoded for use with old-style CTBs.
Note: the CTB itself is not emitted.
Errors
Returns Error::InvalidArgument if invoked on
BodyLength::Partial. If you want to serialize a
new-style length, use serialize(..).
Trait Implementations
Emits the length encoded for use with new-style CTBs.
Note: the CTB itself is not emitted.
Errors
Returns Error::InvalidArgument if invoked on
BodyLength::Indeterminate. If you want to serialize an
old-style length, use serialize_old(..).
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for BodyLength
impl Send for BodyLength
impl Sync for BodyLength
impl Unpin for BodyLength
impl UnwindSafe for BodyLength
Blanket Implementations
Mutably borrows from an owned value. Read more