Enum sequoia_openpgp::packet::OnePassSig
source · #[non_exhaustive]
pub enum OnePassSig {
V3(OnePassSig3),
}
Expand description
Holds a one-pass signature packet.
See Section 5.4 of RFC 4880 for details.
A OnePassSig
packet is not normally instantiated directly. In
most cases, you’ll create one as a side-effect of signing a
message using the streaming serializer, or parsing a signed
message using the PacketParser
.
Note: This enum cannot be exhaustively matched to allow future extensions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
V3(OnePassSig3)
OnePassSig packet version 3.
Implementations§
Methods from Deref<Target = OnePassSig3>§
sourcepub fn typ(&self) -> SignatureType
pub fn typ(&self) -> SignatureType
Gets the signature type.
sourcepub fn set_type(&mut self, t: SignatureType) -> SignatureType
pub fn set_type(&mut self, t: SignatureType) -> SignatureType
Sets the signature type.
sourcepub fn pk_algo(&self) -> PublicKeyAlgorithm
pub fn pk_algo(&self) -> PublicKeyAlgorithm
Gets the public key algorithm.
sourcepub fn set_pk_algo(&mut self, algo: PublicKeyAlgorithm) -> PublicKeyAlgorithm
pub fn set_pk_algo(&mut self, algo: PublicKeyAlgorithm) -> PublicKeyAlgorithm
Sets the public key algorithm.
sourcepub fn hash_algo(&self) -> HashAlgorithm
pub fn hash_algo(&self) -> HashAlgorithm
Gets the hash algorithm.
sourcepub fn set_hash_algo(&mut self, algo: HashAlgorithm) -> HashAlgorithm
pub fn set_hash_algo(&mut self, algo: HashAlgorithm) -> HashAlgorithm
Sets the hash algorithm.
sourcepub fn set_issuer(&mut self, issuer: KeyID) -> KeyID
pub fn set_issuer(&mut self, issuer: KeyID) -> KeyID
Sets the issuer.
sourcepub fn set_last_raw(&mut self, last: u8) -> u8
pub fn set_last_raw(&mut self, last: u8) -> u8
Sets the raw value of the last flag.
Trait Implementations§
source§impl Any<OnePassSig> for Packet
impl Any<OnePassSig> for Packet
source§fn downcast(self) -> Result<OnePassSig, Packet>
fn downcast(self) -> Result<OnePassSig, Packet>
Attempts to downcast to
T
, returning the packet if it fails. Read moresource§fn downcast_ref(&self) -> Option<&OnePassSig>
fn downcast_ref(&self) -> Option<&OnePassSig>
source§fn downcast_mut(&mut self) -> Option<&mut OnePassSig>
fn downcast_mut(&mut self) -> Option<&mut OnePassSig>
source§impl Clone for OnePassSig
impl Clone for OnePassSig
source§fn clone(&self) -> OnePassSig
fn clone(&self) -> OnePassSig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for OnePassSig
impl Debug for OnePassSig
source§impl Deref for OnePassSig
impl Deref for OnePassSig
source§impl DerefMut for OnePassSig
impl DerefMut for OnePassSig
source§impl From<OnePassSig> for Packet
impl From<OnePassSig> for Packet
source§fn from(s: OnePassSig) -> Self
fn from(s: OnePassSig) -> Self
Converts to this type from the input type.
source§impl From<OnePassSig3> for OnePassSig
impl From<OnePassSig3> for OnePassSig
source§fn from(s: OnePassSig3) -> Self
fn from(s: OnePassSig3) -> Self
Converts to this type from the input type.
source§impl Hash for OnePassSig
impl Hash for OnePassSig
source§impl IntoIterator for OnePassSig
impl IntoIterator for OnePassSig
Implement IntoIterator
so that
cert::insert_packets(sig)
just works.
source§impl Marshal for OnePassSig
impl Marshal for OnePassSig
source§impl MarshalInto for OnePassSig
impl MarshalInto for OnePassSig
source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
Computes the maximal length of the serialized representation. Read more
source§fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
Serializes into the given buffer. Read more
source§impl<'a> Parse<'a, OnePassSig> for OnePassSig
impl<'a> Parse<'a, OnePassSig> for OnePassSig
source§impl PartialEq<OnePassSig> for OnePassSig
impl PartialEq<OnePassSig> for OnePassSig
source§fn eq(&self, other: &OnePassSig) -> bool
fn eq(&self, other: &OnePassSig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.