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

pub enum PacketRef<'a> {
    Unknown(&'a Unknown),
    Signature(&'a Signature),
    OnePassSig(&'a OnePassSig),
    PublicKey(&'a Key<PublicParts, PrimaryRole>),
    PublicSubkey(&'a Key<PublicParts, SubordinateRole>),
    SecretKey(&'a Key<SecretParts, PrimaryRole>),
    SecretSubkey(&'a Key<SecretParts, SubordinateRole>),
    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 Key<PublicParts, PrimaryRole>)

Public key packet.

PublicSubkey(&'a Key<PublicParts, SubordinateRole>)

Public subkey packet.

SecretKey(&'a Key<SecretParts, PrimaryRole>)

Public/Secret key pair.

SecretSubkey(&'a Key<SecretParts, SubordinateRole>)

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]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for PacketRef<'a>

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

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

impl<'a> Unpin for PacketRef<'a>

impl<'a> !UnwindSafe for PacketRef<'a>

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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<V> for T where
    V: MultiLane<T>,