Enum pgp::packet::Packet

source ·
pub enum Packet {
Show 17 variants CompressedData(CompressedData), PublicKey(PublicKey), PublicSubkey(PublicSubkey), SecretKey(SecretKey), SecretSubkey(SecretSubkey), LiteralData(LiteralData), Marker(Marker), ModDetectionCode(ModDetectionCode), OnePassSignature(OnePassSignature), PublicKeyEncryptedSessionKey(PublicKeyEncryptedSessionKey), Signature(Signature), SymEncryptedData(SymEncryptedData), SymEncryptedProtectedData(SymEncryptedProtectedData), SymKeyEncryptedSessionKey(SymKeyEncryptedSessionKey), Trust(Trust), UserAttribute(UserAttribute), UserId(UserId),
}

Variants§

§

CompressedData(CompressedData)

§

PublicKey(PublicKey)

§

PublicSubkey(PublicSubkey)

§

SecretKey(SecretKey)

§

SecretSubkey(SecretSubkey)

§

LiteralData(LiteralData)

§

Marker(Marker)

§

ModDetectionCode(ModDetectionCode)

§

OnePassSignature(OnePassSignature)

§

PublicKeyEncryptedSessionKey(PublicKeyEncryptedSessionKey)

§

Signature(Signature)

§

SymEncryptedData(SymEncryptedData)

§

SymEncryptedProtectedData(SymEncryptedProtectedData)

§

SymKeyEncryptedSessionKey(SymKeyEncryptedSessionKey)

§

Trust(Trust)

§

UserAttribute(UserAttribute)

§

UserId(UserId)

Implementations§

source§

impl Packet

source

pub fn tag(&self) -> Tag

Returns the tag for this packet type.

source

pub fn packet_version(&self) -> Version

Trait Implementations§

source§

impl Debug for Packet

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<CompressedData> for Packet

source§

fn from(other: CompressedData) -> Packet

Converts to this type from the input type.
source§

impl From<Edata> for Packet

source§

fn from(other: Edata) -> Packet

Converts to this type from the input type.
source§

impl From<Esk> for Packet

source§

fn from(other: Esk) -> Packet

Converts to this type from the input type.
source§

impl From<LiteralData> for Packet

source§

fn from(other: LiteralData) -> Packet

Converts to this type from the input type.
source§

impl From<Marker> for Packet

source§

fn from(other: Marker) -> Packet

Converts to this type from the input type.
source§

impl From<ModDetectionCode> for Packet

source§

fn from(other: ModDetectionCode) -> Packet

Converts to this type from the input type.
source§

impl From<OnePassSignature> for Packet

source§

fn from(other: OnePassSignature) -> Packet

Converts to this type from the input type.
source§

impl From<PublicKey> for Packet

source§

fn from(other: PublicKey) -> Packet

Converts to this type from the input type.
source§

impl From<PublicKeyEncryptedSessionKey> for Packet

source§

fn from(other: PublicKeyEncryptedSessionKey) -> Packet

Converts to this type from the input type.
source§

impl From<PublicSubkey> for Packet

source§

fn from(other: PublicSubkey) -> Packet

Converts to this type from the input type.
source§

impl From<SecretKey> for Packet

source§

fn from(other: SecretKey) -> Packet

Converts to this type from the input type.
source§

impl From<SecretSubkey> for Packet

source§

fn from(other: SecretSubkey) -> Packet

Converts to this type from the input type.
source§

impl From<Signature> for Packet

source§

fn from(other: Signature) -> Packet

Converts to this type from the input type.
source§

impl From<SymEncryptedData> for Packet

source§

fn from(other: SymEncryptedData) -> Packet

Converts to this type from the input type.
source§

impl From<SymEncryptedProtectedData> for Packet

source§

fn from(other: SymEncryptedProtectedData) -> Packet

Converts to this type from the input type.
source§

impl From<SymKeyEncryptedSessionKey> for Packet

source§

fn from(other: SymKeyEncryptedSessionKey) -> Packet

Converts to this type from the input type.
source§

impl From<Trust> for Packet

source§

fn from(other: Trust) -> Packet

Converts to this type from the input type.
source§

impl From<UserAttribute> for Packet

source§

fn from(other: UserAttribute) -> Packet

Converts to this type from the input type.
source§

impl From<UserId> for Packet

source§

fn from(other: UserId) -> Packet

Converts to this type from the input type.
source§

impl Serialize for Packet

source§

fn to_writer<W: Write>(&self, writer: &mut W) -> Result<()>

source§

fn to_bytes(&self) -> Result<Vec<u8>>

source§

impl TryFrom<Packet> for CompressedData

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<CompressedData, Self::Error>

Performs the conversion.
source§

impl TryFrom<Packet> for Edata

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<Edata>

Performs the conversion.
source§

impl TryFrom<Packet> for Esk

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<Esk>

Performs the conversion.
source§

impl TryFrom<Packet> for LiteralData

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<LiteralData, Self::Error>

Performs the conversion.
source§

impl TryFrom<Packet> for Marker

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<Marker, Self::Error>

Performs the conversion.
source§

impl TryFrom<Packet> for ModDetectionCode

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<ModDetectionCode, Self::Error>

Performs the conversion.
source§

impl TryFrom<Packet> for OnePassSignature

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<OnePassSignature, Self::Error>

Performs the conversion.
source§

impl TryFrom<Packet> for PublicKey

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<PublicKey, Self::Error>

Performs the conversion.
source§

impl TryFrom<Packet> for PublicKeyEncryptedSessionKey

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<PublicKeyEncryptedSessionKey, Self::Error>

Performs the conversion.
source§

impl TryFrom<Packet> for PublicSubkey

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<PublicSubkey, Self::Error>

Performs the conversion.
source§

impl TryFrom<Packet> for SecretKey

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<SecretKey, Self::Error>

Performs the conversion.
source§

impl TryFrom<Packet> for SecretSubkey

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<SecretSubkey, Self::Error>

Performs the conversion.
source§

impl TryFrom<Packet> for Signature

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<Signature, Self::Error>

Performs the conversion.
source§

impl TryFrom<Packet> for SymEncryptedData

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<SymEncryptedData, Self::Error>

Performs the conversion.
source§

impl TryFrom<Packet> for SymEncryptedProtectedData

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<SymEncryptedProtectedData, Self::Error>

Performs the conversion.
source§

impl TryFrom<Packet> for SymKeyEncryptedSessionKey

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<SymKeyEncryptedSessionKey, Self::Error>

Performs the conversion.
source§

impl TryFrom<Packet> for Trust

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<Trust, Self::Error>

Performs the conversion.
source§

impl TryFrom<Packet> for UserAttribute

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<UserAttribute, Self::Error>

Performs the conversion.
source§

impl TryFrom<Packet> for UserId

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(other: Packet) -> Result<UserId, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V