pub struct Unknown { /* private fields */ }
Expand description

Holds an unknown packet.

This is used by the parser to hold packets that it doesn’t know how to process rather than abort.

This packet effectively holds a binary blob.

A note on equality

Two Unknown packets are considered equal if their tags and their bodies are equal.

Implementations§

Returns a new Unknown packet.

The security requirements of the hash algorithm for self-signatures.

A cryptographic hash algorithm usually has three security properties: pre-image resistance, second pre-image resistance, and collision resistance. If an attacker can influence the signed data, then the hash algorithm needs to have both second pre-image resistance, and collision resistance. If not, second pre-image resistance is sufficient.

In general, an attacker may be able to influence third-party signatures. But direct key signatures, and binding signatures are only over data fully determined by signer. And, an attacker’s control over self signatures over User IDs is limited due to their structure.

These observations can be used to extend the life of a hash algorithm after its collision resistance has been partially compromised, but not completely broken. For more details, please refer to the documentation for HashAlgoSecurity.

Gets the unknown packet’s tag.

Sets the unknown packet’s tag.

Gets the unknown packet’s error.

This is the error that caused parsing or processing to abort.

Sets the unknown packet’s error.

This is the error that caused parsing or processing to abort.

This packet implements the unprocessed container interface.

Container packets like this one can contain unprocessed data.

Gets a reference to the this packet’s body.

Sets the this 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
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 object to o.
Exports a serialized version of the object to o. Read more
Computes the maximal length of the serialized representation. Read more
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
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Tries to convert a packet to an Unknown. Returns an error if the given packet is a container packet (i.e. a compressed data packet or an encrypted data packet of any kind).

The type returned in the event of a conversion error.

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.