logo
pub struct CompressedData { /* private fields */ }
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.

Gets the packet’s body.

Sets the packet’s body.

Trait Implementations

Attempts to downcast to T, returning the packet if it fails. Read more

Attempts to downcast to &T, returning None if it fails. Read more

Attempts to downcast to &mut T, returning None if it fails. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Converts to this type from the input type.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Implement IntoIterator so that cert::insert_packets(sig) just works.

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

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.

Exports a serialized version of the object to o. Read more

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

Serializes the packet to a vector.

Exports into the given buffer. Read more

Exports to a vector. Read more

Reads from the given reader.

Reads from the given slice. Read more

Reads from the given file. Read more

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

This method tests for !=.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

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

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.