Enum sequoia_openpgp::types::SignatureType
source · #[non_exhaustive]pub enum SignatureType {
Show 17 variants
Binary,
Text,
Standalone,
GenericCertification,
PersonaCertification,
CasualCertification,
PositiveCertification,
AttestationKey,
SubkeyBinding,
PrimaryKeyBinding,
DirectKey,
KeyRevocation,
SubkeyRevocation,
CertificationRevocation,
Timestamp,
Confirmation,
Unknown(u8),
}
Expand description
Signature type as defined in Section 5.2.1 of RFC 4880.
Note: This enum cannot be exhaustively matched to allow future extensions.
§Examples
Use SignatureType
to create a timestamp signature:
use sequoia_openpgp as openpgp;
use std::time::SystemTime;
use openpgp::packet::signature::SignatureBuilder;
use openpgp::types::SignatureType;
let mut builder = SignatureBuilder::new(SignatureType::Timestamp)
.set_signature_creation_time(SystemTime::now())?;
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Binary
Signature over a binary document.
Text
Signature over a canonical text document.
Standalone
Standalone signature.
GenericCertification
Generic certification of a User ID and Public-Key packet.
PersonaCertification
Persona certification of a User ID and Public-Key packet.
CasualCertification
Casual certification of a User ID and Public-Key packet.
PositiveCertification
Positive certification of a User ID and Public-Key packet.
AttestationKey
Attestation Key Signature (proposed).
Allows the certificate owner to attest to third party certifications. See Section 5.2.3.30 of RFC 4880bis for details.
SubkeyBinding
Subkey Binding Signature
PrimaryKeyBinding
Primary Key Binding Signature
DirectKey
Signature directly on a key
KeyRevocation
Key revocation signature
SubkeyRevocation
Subkey revocation signature
CertificationRevocation
Certification revocation signature
Timestamp
Timestamp signature.
Confirmation
Third-Party Confirmation signature.
Unknown(u8)
Catchall.
Implementations§
source§impl SignatureType
impl SignatureType
sourcepub fn variants() -> impl Iterator<Item = Self>
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 SignatureType::Unknown
variants.
Trait Implementations§
source§impl Clone for SignatureType
impl Clone for SignatureType
source§fn clone(&self) -> SignatureType
fn clone(&self) -> SignatureType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SignatureType
impl Debug for SignatureType
source§impl Display for SignatureType
impl Display for SignatureType
source§impl From<SignatureType> for u8
impl From<SignatureType> for u8
source§fn from(t: SignatureType) -> Self
fn from(t: SignatureType) -> Self
source§impl From<u8> for SignatureType
impl From<u8> for SignatureType
source§impl Hash for SignatureType
impl Hash for SignatureType
source§impl Ord for SignatureType
impl Ord for SignatureType
source§fn cmp(&self, other: &SignatureType) -> Ordering
fn cmp(&self, other: &SignatureType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for SignatureType
impl PartialEq for SignatureType
source§fn eq(&self, other: &SignatureType) -> bool
fn eq(&self, other: &SignatureType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SignatureType
impl PartialOrd for SignatureType
source§fn partial_cmp(&self, other: &SignatureType) -> Option<Ordering>
fn partial_cmp(&self, other: &SignatureType) -> Option<Ordering>
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 SignatureType
impl Eq for SignatureType
impl StructuralPartialEq for SignatureType
Auto Trait Implementations§
impl Freeze for SignatureType
impl RefUnwindSafe for SignatureType
impl Send for SignatureType
impl Sync for SignatureType
impl Unpin for SignatureType
impl UnwindSafe for SignatureType
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
)