Serializes OpenPGP data structures into pre-allocated buffers.
This trait provides the same interface as
SerializeInto, but is
implemented for all data structures that can be serialized.
This trait is sealed and cannot be implemented for types outside this crate.
Therefore it can be extended in a non-breaking way.
If you want to implement the trait inside the crate
you also need to implement the
seal::Sealed marker trait.
Computes the maximal length of the serialized representation.
If serialization would fail, this function underestimates the length.
Serializes the packet to a vector.
Exports into the given buffer.
This is similar to
serialize_into(..), with these
- It is an error to export a
Signatureif it is marked as non-exportable.
- When exporting a
Cert, non-exportable signatures are not exported, and any component bound merely by non-exportable signatures is not exported.
Returns the length of the serialized representation.
If the length of the given slice is smaller than the maximal
length computed by
serialized_len(), this function returns