#[non_exhaustive]
pub enum SubpacketTag {
Show 31 variants SignatureCreationTime, SignatureExpirationTime, ExportableCertification, TrustSignature, RegularExpression, Revocable, KeyExpirationTime, PlaceholderForBackwardCompatibility, PreferredSymmetricAlgorithms, RevocationKey, Issuer, NotationData, PreferredHashAlgorithms, PreferredCompressionAlgorithms, KeyServerPreferences, PreferredKeyServer, PrimaryUserID, PolicyURI, KeyFlags, SignersUserID, ReasonForRevocation, Features, SignatureTarget, EmbeddedSignature, IssuerFingerprint, PreferredAEADAlgorithms, IntendedRecipient, AttestedCertifications, Reserved(u8), Private(u8), Unknown(u8),
}
Expand description

The subpacket types.

The SubpacketTag enum holds a Subpacket’s identifier, the so-called tag.

Note: This enum cannot be exhaustively matched to allow future extensions.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

SignatureCreationTime

The time the signature was made.

See Section 5.2.3.4 of RFC 4880 for details.

§

SignatureExpirationTime

The validity period of the signature.

The validity is relative to the time stored in the signature’s Signature Creation Time subpacket.

See Section 5.2.3.10 of RFC 4880 for details.

§

ExportableCertification

Whether a signature should be published.

See Section 5.2.3.11 of RFC 4880 for details.

§

TrustSignature

Signer asserts that the key is not only valid but also trustworthy at the specified level.

See Section 5.2.3.13 of RFC 4880 for details.

§

RegularExpression

Used in conjunction with Trust Signature packets (of level > 0) to limit the scope of trust that is extended.

See Section 5.2.3.14 of RFC 4880 for details.

§

Revocable

Whether a signature can later be revoked.

See Section 5.2.3.12 of RFC 4880 for details.

§

KeyExpirationTime

The validity period of the key.

The validity period is relative to the key’s (not the signature’s) creation time.

See Section 5.2.3.6 of RFC 4880 for details.

§

PlaceholderForBackwardCompatibility

Deprecated

§

PreferredSymmetricAlgorithms

The Symmetric algorithms that the certificate holder prefers.

See Section 5.2.3.7 of RFC 4880 for details.

§

RevocationKey

Authorizes the specified key to issue revocation signatures for this certificate.

See Section 5.2.3.15 of RFC 4880 for details.

§

Issuer

The OpenPGP Key ID of the key issuing the signature.

See Section 5.2.3.5 of RFC 4880 for details.

§

NotationData

A “notation” on the signature.

See Section 5.2.3.16 of RFC 4880 for details.

§

PreferredHashAlgorithms

The Hash algorithms that the certificate holder prefers.

See Section 5.2.3.8 of RFC 4880 for details.

§

PreferredCompressionAlgorithms

The compression algorithms that the certificate holder prefers.

See Section 5.2.3.9 of RFC 4880 for details.

§

KeyServerPreferences

A list of flags that indicate preferences that the certificate holder has about how the key is handled by a key server.

See Section 5.2.3.17 of RFC 4880 for details.

§

PreferredKeyServer

The URI of a key server where the certificate holder keeps their certificate up to date.

See Section 5.2.3.18 of RFC 4880 for details.

§

PrimaryUserID

A flag in a User ID’s self-signature that states whether this User ID is the primary User ID for this certificate.

See Section 5.2.3.19 of RFC 4880 for details.

§

PolicyURI

The URI of a document that describes the policy under which the signature was issued.

See Section 5.2.3.20 of RFC 4880 for details.

§

KeyFlags

A list of flags that hold information about a key.

See Section 5.2.3.21 of RFC 4880 for details.

§

SignersUserID

The User ID that is responsible for the signature.

See Section 5.2.3.22 of RFC 4880 for details.

§

ReasonForRevocation

The reason for a revocation, used in key revocations and certification revocation signatures.

See Section 5.2.3.23 of RFC 4880 for details.

§

Features

The OpenPGP features a user’s implementation supports.

See Section 5.2.3.24 of RFC 4880 for details.

§

SignatureTarget

A signature to which this signature refers.

See Section 5.2.3.25 of RFC 4880 for details.

§

EmbeddedSignature

A complete Signature packet body.

This is used to store a backsig in a subkey binding signature.

See Section 5.2.3.26 of RFC 4880 for details.

§

IssuerFingerprint

The Fingerprint of the key that issued the signature (proposed).

See Section 5.2.3.28 of RFC 4880bis for details.

§

PreferredAEADAlgorithms

👎Deprecated

The AEAD algorithms that the certificate holder prefers (proposed).

See Section 5.2.3.8 of RFC 4880bis for details.

§

IntendedRecipient

Who the signed message was intended for (proposed).

See Section 5.2.3.29 of RFC 4880bis for details.

§

AttestedCertifications

The Attested Certifications subpacket (proposed).

Allows the certificate holder to attest to third party certifications, allowing them to be distributed with the certificate. This can be used to address certificate flooding concerns.

See Section 5.2.3.30 of RFC 4880bis for details.

§

Reserved(u8)

Reserved subpacket tag.

§

Private(u8)

Private subpacket tag.

§

Unknown(u8)

Unknown subpacket tag.

Implementations§

source§

impl SubpacketTag

source

pub fn variants() -> impl Iterator<Item = Self>

Returns an iterator over all valid variants.

Returns an iterator over all known variants. This does not include the SubpacketTag::Reserved, SubpacketTag::Private, or SubpacketTag::Unknown variants.

Trait Implementations§

source§

impl Clone for SubpacketTag

source§

fn clone(&self) -> SubpacketTag

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SubpacketTag

source§

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

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

impl Display for SubpacketTag

source§

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

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

impl From<SubpacketTag> for u8

source§

fn from(t: SubpacketTag) -> Self

Converts to this type from the input type.
source§

impl From<u8> for SubpacketTag

source§

fn from(u: u8) -> Self

Converts to this type from the input type.
source§

impl Hash for SubpacketTag

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for SubpacketTag

source§

fn cmp(&self, other: &SubpacketTag) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for SubpacketTag

source§

fn eq(&self, other: &SubpacketTag) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for SubpacketTag

source§

fn partial_cmp(&self, other: &SubpacketTag) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for SubpacketTag

source§

impl Eq for SubpacketTag

source§

impl StructuralPartialEq for SubpacketTag

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> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
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.
source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T