pub struct OnePassSig6 { /* private fields */ }
Expand description
Holds a version 6 one-pass signature packet.
This holds a version 6 One-Pass Signature Packet. Normally, you won’t
directly work with this data structure, but with the OnePassSig
enum, which is version agnostic. An exception is when you need to
do version-specific operations.
§A note on equality
The last
flag is represented as a u8
and is compared
literally, not semantically.
Implementations§
Source§impl OnePassSig6
impl OnePassSig6
Sourcepub fn new(typ: SignatureType, issuer: Fingerprint) -> Self
pub fn new(typ: SignatureType, issuer: Fingerprint) -> Self
Returns a new One-Pass Signature packet.
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 issuer(&self) -> &Fingerprint
pub fn issuer(&self) -> &Fingerprint
Gets the issuer.
Sourcepub fn set_issuer(&mut self, issuer: Fingerprint) -> Fingerprint
pub fn set_issuer(&mut self, issuer: Fingerprint) -> Fingerprint
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 Clone for OnePassSig6
impl Clone for OnePassSig6
Source§fn clone(&self) -> OnePassSig6
fn clone(&self) -> OnePassSig6
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OnePassSig6
impl Debug for OnePassSig6
Source§impl From<OnePassSig6> for OnePassSig
impl From<OnePassSig6> for OnePassSig
Source§fn from(s: OnePassSig6) -> Self
fn from(s: OnePassSig6) -> Self
Converts to this type from the input type.
Source§impl From<OnePassSig6> for Packet
impl From<OnePassSig6> for Packet
Source§fn from(p: OnePassSig6) -> Self
fn from(p: OnePassSig6) -> Self
Converts to this type from the input type.
Source§impl Hash for OnePassSig6
impl Hash for OnePassSig6
Source§impl Marshal for OnePassSig6
impl Marshal for OnePassSig6
Source§impl MarshalInto for OnePassSig6
impl MarshalInto for OnePassSig6
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, OnePassSig6> for OnePassSig6
impl<'a> Parse<'a, OnePassSig6> for OnePassSig6
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. Read more
Source§impl PartialEq for OnePassSig6
impl PartialEq for OnePassSig6
Source§impl<'a> TryFrom<&'a Signature> for OnePassSig6
impl<'a> TryFrom<&'a Signature> for OnePassSig6
Source§impl TryFrom<OnePassSig> for OnePassSig6
impl TryFrom<OnePassSig> for OnePassSig6
impl Eq for OnePassSig6
impl StructuralPartialEq for OnePassSig6
Auto Trait Implementations§
impl Freeze for OnePassSig6
impl RefUnwindSafe for OnePassSig6
impl Send for OnePassSig6
impl Sync for OnePassSig6
impl Unpin for OnePassSig6
impl UnwindSafe for OnePassSig6
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