Enum sequoia_openpgp::packet::Tag
source · [−]pub enum Tag {
}
Expand description
The OpenPGP packet tags as defined in Section 4.3 of RFC 4880.
The values correspond to the serialized format.
Variants
Reserved
Reserved Packet tag.
PKESK
Public-Key Encrypted Session Key Packet.
Signature
Signature Packet.
SKESK
Symmetric-Key Encrypted Session Key Packet.
OnePassSig
One-Pass Signature Packet.
SecretKey
Secret-Key Packet.
PublicKey
Public-Key Packet.
SecretSubkey
Secret-Subkey Packet.
CompressedData
Compressed Data Packet.
SED
Symmetrically Encrypted Data Packet.
Marker
Marker Packet (Obsolete Literal Packet).
Literal
Literal Data Packet.
Trust
Trust Packet.
UserID
User ID Packet.
PublicSubkey
Public-Subkey Packet.
UserAttribute
User Attribute Packet.
SEIP
Sym. Encrypted and Integrity Protected Data Packet.
MDC
Modification Detection Code Packet.
AED
AEAD Encrypted Data Packet.
This feature is experimental.
Unknown(u8)
Unassigned packets (as of RFC4880).
Private(u8)
Experimental packets.
Implementations
sourceimpl Tag
impl Tag
sourcepub fn valid_start_of_message(&self) -> bool
pub fn valid_start_of_message(&self) -> bool
Returns whether the Tag
can be at the start of a valid
message.
Certs can start with PublicKey
, TSKs with a SecretKey
.
Messages start with a OnePassSig
, Signature
(old style
non-one pass signatures), PKESK
, SKESK
, CompressedData
,
or Literal
.
Signatures can standalone either as a detached signature, a third-party certification, or a revocation certificate.
sourcepub fn variants() -> impl Iterator<Item = Tag>
pub fn variants() -> impl Iterator<Item = Tag>
Returns an iterator over all valid variants.
Returns an iterator over all known variants. This does not
include the Tag::Reserved
, Tag::Private
, or
Tag::Unknown
variants.
Trait Implementations
sourceimpl Ord for Tag
impl Ord for Tag
sourceimpl PartialOrd<Tag> for Tag
impl PartialOrd<Tag> for Tag
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
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 · sourcefn le(&self, other: &Rhs) -> bool
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
impl Copy for Tag
impl Eq for Tag
Auto Trait Implementations
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin for Tag
impl UnwindSafe for Tag
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more