[][src]Trait sequoia_openpgp::serialize::Serialize

pub trait Serialize {
    fn serialize(&self, o: &mut dyn Write) -> Result<()>;

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

Serializes OpenPGP data structures.

Required methods

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

Writes a serialized version of the object to o.

Loading content...

Provided methods

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 TPK, non-exportable signatures are not exported, and any component bound merely by non-exportable signatures is not exported.
Loading content...

Implementors

impl Serialize for Ciphertext[src]

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

impl Serialize for PublicKey[src]

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

impl Serialize for SecretKeyMaterial[src]

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

impl Serialize for sequoia_openpgp::crypto::mpis::Signature[src]

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

impl Serialize for S2K[src]

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

impl Serialize for Sexp[src]

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

impl Serialize for Fingerprint[src]

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

impl Serialize for KeyID[src]

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

impl Serialize for Packet[src]

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

Writes a serialized version of the specified Packet to o.

This function works recursively: if the packet contains any packets, they are also serialized.

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

Exports a serialized version of the specified Packet to o.

This function works recursively: if the packet contains any packets, they are also serialized.

impl Serialize for AED[src]

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

impl Serialize for OnePassSig[src]

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

impl Serialize for PKESK[src]

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

impl Serialize for SEIP[src]

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

Writes a serialized version of the specified SEIP packet to o.

Errors

Returns Error::InvalidOperation if this packet has children. To construct an encrypted message, use serialize::stream::Encryptor.

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

impl Serialize for SKESK[src]

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

impl Serialize for sequoia_openpgp::packet::Signature[src]

impl Serialize for CTB[src]

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

impl Serialize for BodyLength[src]

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

Emits the length encoded for use with new-style CTBs.

Note: the CTB itself is not emitted.

Errors

Returns Error::InvalidArgument if invoked on BodyLength::Indeterminate. If you want to serialize an old-style length, use serialize_old(..).

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

impl Serialize for Image[src]

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

impl Serialize for sequoia_openpgp::packet::user_attribute::Subpacket[src]

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

impl Serialize for AutocryptHeader[src]

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

impl Serialize for MPI[src]

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

impl Serialize for ProtectedMPI[src]

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

impl Serialize for String_[src]

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

impl Serialize for AED1[src]

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

Writes a serialized version of the specified AED packet to o.

Errors

Returns Error::InvalidOperation if this packet has children. To construct an encrypted message, use serialize::stream::Encryptor.

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

impl Serialize for CTBNew[src]

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

impl Serialize for CTBOld[src]

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

impl Serialize for Header[src]

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

impl Serialize for OnePassSig3[src]

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

impl Serialize for PKESK3[src]

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

impl Serialize for Signature4[src]

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

Writes a serialized version of the specified Signature packet to o.

Errors

Returns Error::InvalidArgument if either the hashed-area or the unhashed-area exceeds the size limit of 2^16.

impl Serialize for SKESK4[src]

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

impl Serialize for SKESK5[src]

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

impl Serialize for CompressedData[src]

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

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.

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

impl Serialize for Literal[src]

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

impl Serialize for MDC[src]

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

impl Serialize for Marker[src]

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

impl Serialize for Trust[src]

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

impl Serialize for Unknown[src]

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

impl Serialize for UserID[src]

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

impl Serialize for UserAttribute[src]

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

impl Serialize for Message[src]

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

Writes a serialized version of the specified Message to o.

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

impl Serialize for PacketPile[src]

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

Writes a serialized version of the specified PacketPile to o.

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

Exports a serialized version of the specified PacketPile to o.

impl Serialize for TPK[src]

impl<'a> Serialize for SubpacketValue<'a>[src]

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

impl<'a> Serialize for PacketRef<'a>[src]

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

Writes a serialized version of the specified Packet to o.

This function works recursively: if the packet contains any packets, they are also serialized.

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

Exports a serialized version of the specified Packet to o.

This function works recursively: if the packet contains any packets, they are also serialized.

impl<'a> Serialize for sequoia_openpgp::packet::signature::subpacket::Subpacket<'a>[src]

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

impl<'a> Serialize for TSK<'a>[src]

impl<P, R> Serialize for Key4<P, R> where
    P: KeyParts,
    R: KeyRole
[src]

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

impl<P: KeyParts, R: KeyRole> Serialize for Key<P, R>[src]

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

Loading content...