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 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§fn from_buffered_reader<R>(reader: R) -> Result<Self>where
R: BufferedReader<Cookie> + 'a,
fn from_buffered_reader<R>(reader: R) -> Result<Self>where
R: BufferedReader<Cookie> + 'a,
Reads from the given buffered reader.
source§fn from_reader<R: 'a + Read + Send + Sync>(reader: R) -> Result<Self>
fn from_reader<R: 'a + Read + Send + Sync>(reader: R) -> Result<Self>
Reads from the given reader.
source§impl PartialEq for OnePassSig
impl PartialEq 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 ==
.source§impl<'a> TryFrom<&'a Signature> for OnePassSig
impl<'a> TryFrom<&'a Signature> for OnePassSig
source§impl Deref for OnePassSig
impl Deref for OnePassSig
impl Eq for OnePassSig
impl StructuralPartialEq for OnePassSig
Auto Trait Implementations§
impl Freeze for OnePassSig
impl RefUnwindSafe for OnePassSig
impl Send for OnePassSig
impl Sync for OnePassSig
impl Unpin for OnePassSig
impl UnwindSafe for OnePassSig
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
Mutably borrows from an owned value. Read more
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)