Fields used by multiple packet types.
Used by container packets (such as the encryption and compression packets) to reference their immediate children. This results in a tree structure.
This is automatically populated when using the
deserialization routines, e.g.,
default, it is not automatically filled in by the
PacketParser deserialization routines; this needs to be
Holds a packet's body.
We conceptually divide packets into two parts: the header and the body. Whereas the header is read eagerly when the packet is deserialized, the body is only read on demand.
A packet's body is stored here either when configured via
PacketParserBuilder::buffer_unread_content, when one of
PacketPile deserialization routines is used, or on demand
for a particular packet using the
There are three different types of packets:
- Packets like the
Signaturepackets, don't actually have a body. These packets don't use this field.
One packet, the literal data packet, includes unstructured data. That data can be stored here.
Some packets are containers. If the parser does not parse the packet's child, either because the caller used
PacketParser::nextto get the next packet, or the maximum recursion depth was reached, then the packets can be stored here as a byte stream. (If the caller so chooses, the content can be parsed later using the regular deserialization routines, since the content is just an OpenPGP message.)
Note: if some of a packet's data is processed, and the
PacketParser is configured to buffer unread content, then
this is not the packet's entire content; it is just the unread
pub fn descendants(&self) -> PacketIter[src]
Returns an iterator over all of the packet's descendants, in depth-first order.
Retrieves the packet's body.
Packets can store a sequence of bytes as body, e.g. if the maximum recursion level is reached while parsing a sequence of packets, the container's body is stored as is.
Sets the packet's body.
Setting the body clears the old body, or any of the packet's descendants.
fn hash_slice<H>(data: &[Self], state: &mut H) where1.3.0[src]
impl StructuralEq for Common[src]
impl StructuralPartialEq for Common[src]
impl !RefUnwindSafe for Common
impl UnwindSafe for Common
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)[src]
type Error = Infallible
The type returned in the event of a conversion error.