Struct sequoia_openpgp::packet::CompressedData [−][src]
pub struct CompressedData { /* fields omitted */ }
Expand description
Holds a compressed data packet.
A compressed data packet is a container. See Section 5.6 of RFC 4880 for details.
When the parser encounters a compressed data packet with an
unknown compress algorithm, it returns an Unknown
packet instead
of a CompressedData
packet.
Implementations
Returns a new CompressedData
packet.
Gets the compression algorithm.
Sets the compression algorithm.
Methods from Deref<Target = Container>
Returns a reference to this Packet’s children.
Returns None
if the body is not structured.
Returns a mutable reference to this Packet’s children.
Returns None
if the body is not structured.
Returns an iterator over the packet’s descendants. The descendants are visited in depth-first order.
Returns None
if the body is not structured.
Returns an iterator over the packet’s immediate children.
Returns None
if the body is not structured.
Trait Implementations
Performs the conversion.
Implement IntoIterator
so that
cert::insert_packets(sig)
just works.
type Item = CompressedData
type Item = CompressedData
The type of the elements being iterated over.
type IntoIter = Once<CompressedData>
type IntoIter = Once<CompressedData>
Which kind of iterator are we turning this into?
Writes a serialized version of the specified CompressedData
packet to o
.
This function works recursively: if the CompressedData
packet
contains any packets, they are also serialized.
Computes the maximal length of the serialized representation.
The size of the serialized compressed data packet is tricky to predict. First, it depends on the data being compressed. Second, we emit partial body encoded data.
This function tries overestimates the length. However, it may
happen that serialize_into()
fails.
Errors
If serialization would fail, this function returns 0.
Serializes into the given buffer. Read more
Reads from the given reader.
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 CompressedData
impl Send for CompressedData
impl Sync for CompressedData
impl Unpin for CompressedData
impl !UnwindSafe for CompressedData
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self