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

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

Packet serialization.

This interfaces serializes packets and packet trees.

Required methods

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

Writes a serialized version of the packet to o.

Loading content...

Implementors

impl Serialize for Ciphertext[src]

impl Serialize for PublicKey[src]

impl Serialize for SecretKey[src]

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

impl Serialize for S2K[src]

impl Serialize for Fingerprint[src]

impl Serialize for KeyID[src]

impl Serialize for Packet[src]

fn serialize<W: Write>(&self, o: &mut W) -> 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.

impl Serialize for CTB[src]

impl Serialize for BodyLength[src]

fn serialize<W: Write>(&self, o: &mut W) -> 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(..).

impl Serialize for SKESK[src]

impl Serialize for MPI[src]

impl Serialize for CTBNew[src]

impl Serialize for CTBOld[src]

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

impl Serialize for AED[src]

fn serialize<W: Write>(&self, o: &mut W) -> 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.

impl Serialize for CompressedData[src]

fn serialize<W: Write>(&self, o: &mut W) -> 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.

impl Serialize for Header[src]

impl Serialize for Literal[src]

impl Serialize for MDC[src]

impl Serialize for OnePassSig[src]

impl Serialize for PKESK[src]

impl Serialize for SEIP[src]

fn serialize<W: Write>(&self, o: &mut W) -> 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.

impl Serialize for SKESK4[src]

impl Serialize for SKESK5[src]

impl Serialize for Unknown[src]

impl Serialize for UserID[src]

impl Serialize for UserAttribute[src]

impl Serialize for PacketPile[src]

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

Writes a serialized version of the specified PacketPile to o.

impl Serialize for TPK[src]

impl Serialize for TSK[src]

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

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

Loading content...