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§
source§impl 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§
source§impl Ord for Tag
impl Ord for Tag
source§impl PartialOrd for Tag
impl PartialOrd for Tag
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Tag
impl Eq for Tag
Auto Trait Implementations§
impl Freeze for Tag
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin for Tag
impl UnwindSafe for Tag
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)