[][src]Enum sequoia_openpgp::serialize::PacketRef

pub enum PacketRef<'a> {
    Unknown(&'a Unknown),
    Signature(&'a Signature),
    OnePassSig(&'a OnePassSig),
    PublicKey(&'a PublicKey),
    PublicSubkey(&'a PublicSubkey),
    SecretKey(&'a SecretKey),
    SecretSubkey(&'a SecretSubkey),
    Marker(&'a Marker),
    Trust(&'a Trust),
    UserID(&'a UserID),
    UserAttribute(&'a UserAttribute),
    Literal(&'a Literal),
    CompressedData(&'a CompressedData),
    PKESK(&'a PKESK),
    SKESK(&'a SKESK),
    SEIP(&'a SEIP),
    MDC(&'a MDC),
    AED(&'a AED),
}

References packet bodies.

Like openpgp::Packet, but instead of owning the packet's bodies, they are referenced. PacketRef is only used to serialize packet bodies (like packet::Signature) encapsulating them in OpenPGP frames.

Variants

Unknown(&'a Unknown)

Unknown packet.

Signature(&'a Signature)

Signature packet.

OnePassSig(&'a OnePassSig)

One pass signature packet.

PublicKey(&'a PublicKey)

Public key packet.

PublicSubkey(&'a PublicSubkey)

Public subkey packet.

SecretKey(&'a SecretKey)

Public/Secret key pair.

SecretSubkey(&'a SecretSubkey)

Public/Secret subkey pair.

Marker(&'a Marker)

Marker packet.

Trust(&'a Trust)

Trust packet.

UserID(&'a UserID)

User ID packet.

UserAttribute(&'a UserAttribute)

User attribute packet.

Literal(&'a Literal)

Literal data packet.

CompressedData(&'a CompressedData)

Compressed literal data packet.

PKESK(&'a PKESK)

Public key encrypted data packet.

SKESK(&'a SKESK)

Symmetric key encrypted data packet.

SEIP(&'a SEIP)

Symmetric key encrypted, integrity protected data packet.

MDC(&'a MDC)

Modification detection code packet.

AED(&'a AED)

AEAD Encrypted Data Packet.

Trait Implementations

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> SerializeInto for PacketRef<'a>[src]

fn to_vec(&self) -> Result<Vec<u8>>[src]

Serializes the packet to a vector.

fn export_to_vec(&self) -> Result<Vec<u8>>[src]

Exports to a vector. Read more

Auto Trait Implementations

impl<'a> Send for PacketRef<'a>

impl<'a> Sync for PacketRef<'a>

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip for T where
    V: MultiLane<T>,