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
V3(OnePassSig3)
OnePassSig packet version 3.
Implementations
sourceimpl OnePassSig
impl OnePassSig
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
sourceimpl Any<OnePassSig> for Packet
impl Any<OnePassSig> for Packet
sourcefn downcast(self) -> Result<OnePassSig, Packet>
fn downcast(self) -> Result<OnePassSig, Packet>
Attempts to downcast to T
, returning the packet if it fails. Read more
sourcefn downcast_ref(&self) -> Option<&OnePassSig>
fn downcast_ref(&self) -> Option<&OnePassSig>
Attempts to downcast to &T
, returning None
if it fails. Read more
sourcefn downcast_mut(&mut self) -> Option<&mut OnePassSig>
fn downcast_mut(&mut self) -> Option<&mut OnePassSig>
Attempts to downcast to &mut T
, returning None
if it fails. Read more
sourceimpl Clone for OnePassSig
impl Clone for OnePassSig
sourcefn clone(&self) -> OnePassSig
fn clone(&self) -> OnePassSig
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 OnePassSig
impl Debug for OnePassSig
sourceimpl Deref for OnePassSig
impl Deref for OnePassSig
type Target = OnePassSig3
type Target = OnePassSig3
The resulting type after dereferencing.
sourceimpl DerefMut for OnePassSig
impl DerefMut for OnePassSig
sourceimpl From<OnePassSig> for Packet
impl From<OnePassSig> for Packet
sourcefn from(s: OnePassSig) -> Self
fn from(s: OnePassSig) -> Self
Converts to this type from the input type.
sourceimpl From<OnePassSig3> for OnePassSig
impl From<OnePassSig3> for OnePassSig
sourcefn from(s: OnePassSig3) -> Self
fn from(s: OnePassSig3) -> Self
Converts to this type from the input type.
sourceimpl Hash for OnePassSig
impl Hash for OnePassSig
sourceimpl IntoIterator for OnePassSig
impl IntoIterator for OnePassSig
Implement IntoIterator
so that
cert::insert_packets(sig)
just works.
type Item = OnePassSig
type Item = OnePassSig
The type of the elements being iterated over.
type IntoIter = Once<OnePassSig>
type IntoIter = Once<OnePassSig>
Which kind of iterator are we turning this into?
sourceimpl Marshal for OnePassSig
impl Marshal for OnePassSig
sourceimpl MarshalInto for OnePassSig
impl MarshalInto for OnePassSig
sourcefn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
Computes the maximal length of the serialized representation. Read more
sourcefn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
Serializes into the given buffer. Read more
sourceimpl<'a> Parse<'a, OnePassSig> for OnePassSig
impl<'a> Parse<'a, OnePassSig> for OnePassSig
sourceimpl PartialEq<OnePassSig> for OnePassSig
impl PartialEq<OnePassSig> for OnePassSig
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &OnePassSig) -> bool
fn ne(&self, other: &OnePassSig) -> bool
This method tests for !=
.
impl Eq for OnePassSig
impl StructuralEq for OnePassSig
impl StructuralPartialEq for OnePassSig
Auto Trait Implementations
impl RefUnwindSafe for OnePassSig
impl Send for OnePassSig
impl Sync for OnePassSig
impl Unpin for OnePassSig
impl UnwindSafe for OnePassSig
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