#[non_exhaustive]pub enum SignatureType {
Show 17 variants
Binary,
Text,
Standalone,
GenericCertification,
PersonaCertification,
CasualCertification,
PositiveCertification,
CertificationApproval,
SubkeyBinding,
PrimaryKeyBinding,
DirectKey,
KeyRevocation,
SubkeyRevocation,
CertificationRevocation,
Timestamp,
Confirmation,
Unknown(u8),
}
Expand description
Signature type as defined in Section 5.2.1 of RFC 9580.
§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.
CertificationApproval
Certification Approval Key Signature (experimental).
Allows the certificate owner to attest to third party certifications. See Certification Approval Key Signature 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§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more