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
sourceimpl 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
sourceimpl Clone for SignatureType
impl Clone for SignatureType
sourcefn clone(&self) -> SignatureType
fn clone(&self) -> SignatureType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SignatureType
impl Debug for SignatureType
sourceimpl Display for SignatureType
impl Display for SignatureType
sourceimpl From<SignatureType> for u8
impl From<SignatureType> for u8
sourcefn from(t: SignatureType) -> Self
fn from(t: SignatureType) -> Self
Converts to this type from the input type.
sourceimpl From<u8> for SignatureType
impl From<u8> for SignatureType
sourceimpl Hash for SignatureType
impl Hash for SignatureType
sourceimpl Ord for SignatureType
impl Ord for SignatureType
sourceimpl PartialEq<SignatureType> for SignatureType
impl PartialEq<SignatureType> for SignatureType
sourcefn eq(&self, other: &SignatureType) -> bool
fn eq(&self, other: &SignatureType) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SignatureType) -> bool
fn ne(&self, other: &SignatureType) -> bool
This method tests for !=
.
sourceimpl PartialOrd<SignatureType> for SignatureType
impl PartialOrd<SignatureType> for SignatureType
sourcefn partial_cmp(&self, other: &SignatureType) -> Option<Ordering>
fn partial_cmp(&self, other: &SignatureType) -> 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 SignatureType
impl Eq for SignatureType
impl StructuralEq for SignatureType
impl StructuralPartialEq for SignatureType
Auto Trait Implementations
impl RefUnwindSafe for SignatureType
impl Send for SignatureType
impl Sync for SignatureType
impl Unpin for SignatureType
impl UnwindSafe for SignatureType
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