Trait sequoia_openpgp::serialize::Marshal

source ·
pub trait Marshal: Sealed {
    // Required method
    fn serialize(&self, o: &mut dyn Write) -> Result<()>;

    // Provided method
    fn export(&self, o: &mut dyn Write) -> Result<()> { ... }
}
Expand description

Serializes OpenPGP data structures.

This trait provides the same interface as Serialize, but is implemented for all data structures that can be serialized.

In general, you should prefer the Serialize trait, as it is only implemented for data structures that are normally exported. See the documentation for Serialize for more details.

§Sealed trait

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.

Required Methods§

source

fn serialize(&self, o: &mut dyn Write) -> Result<()>

Writes a serialized version of the object to o.

Provided Methods§

source

fn export(&self, o: &mut dyn Write) -> Result<()>

Exports a serialized version of the object to o.

This is similar to serialize(..), with these exceptions:

  • It is an error to export a Signature if 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.

Implementors§

source§

impl Marshal for S2K

source§

impl Marshal for Ciphertext

source§

impl Marshal for PublicKey

source§

impl Marshal for SecretKeyMaterial

source§

impl Marshal for sequoia_openpgp::crypto::mpi::Signature

source§

impl Marshal for Fingerprint

source§

impl Marshal for KeyID

source§

impl Marshal for Packet

source§

impl Marshal for AED

source§

impl Marshal for OnePassSig

source§

impl Marshal for PKESK

source§

impl Marshal for SEIP

source§

impl Marshal for SKESK

source§

impl Marshal for sequoia_openpgp::packet::Signature

source§

impl Marshal for BodyLength

source§

impl Marshal for CTB

source§

impl Marshal for SubpacketValue

source§

impl Marshal for Image

source§

impl Marshal for sequoia_openpgp::packet::user_attribute::Subpacket

source§

impl Marshal for MPI

source§

impl Marshal for ProtectedMPI

source§

impl Marshal for AED1

source§

impl Marshal for CTBNew

source§

impl Marshal for CTBOld

source§

impl Marshal for Header

source§

impl Marshal for OnePassSig3

source§

impl Marshal for PKESK3

source§

impl Marshal for Signature3

source§

impl Marshal for Signature4

source§

impl Marshal for sequoia_openpgp::packet::signature::subpacket::Subpacket

source§

impl Marshal for SubpacketArea

source§

impl Marshal for SKESK4

source§

impl Marshal for SKESK5

source§

impl Marshal for CompressedData

source§

impl Marshal for Literal

source§

impl Marshal for MDC

source§

impl Marshal for Marker

source§

impl Marshal for Trust

source§

impl Marshal for Unknown

source§

impl Marshal for UserID

source§

impl Marshal for UserAttribute

source§

impl Marshal for Cert

source§

impl Marshal for Message

source§

impl Marshal for PacketPile

source§

impl Marshal for RevocationKey

source§

impl<'a> Marshal for RawCert<'a>

source§

impl<'a> Marshal for RawPacket<'a>

source§

impl<'a> Marshal for TSK<'a>

source§

impl<P, R> Marshal for Key4<P, R>
where P: KeyParts, R: KeyRole,

source§

impl<P: KeyParts, R: KeyRole> Marshal for Key<P, R>