Struct sequoia_openpgp::packet::one_pass_sig::OnePassSig3
source · pub struct OnePassSig3 { /* private fields */ }
Expand description
Holds a one-pass signature packet.
See Section 5.4 of RFC 4880 for details.
§A note on equality
The last
flag is represented as a u8
and is compared
literally, not semantically.
Implementations§
source§impl OnePassSig3
impl OnePassSig3
sourcepub fn new(typ: SignatureType) -> Self
pub fn new(typ: SignatureType) -> 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 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 Clone for OnePassSig3
impl Clone for OnePassSig3
source§fn clone(&self) -> OnePassSig3
fn clone(&self) -> OnePassSig3
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 OnePassSig3
impl Debug for OnePassSig3
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 From<OnePassSig3> for Packet
impl From<OnePassSig3> for Packet
source§fn from(p: OnePassSig3) -> Self
fn from(p: OnePassSig3) -> Self
Converts to this type from the input type.
source§impl Hash for OnePassSig3
impl Hash for OnePassSig3
source§impl Marshal for OnePassSig3
impl Marshal for OnePassSig3
source§impl MarshalInto for OnePassSig3
impl MarshalInto for OnePassSig3
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, OnePassSig3> for OnePassSig3
impl<'a> Parse<'a, OnePassSig3> for OnePassSig3
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 OnePassSig3
impl PartialEq for OnePassSig3
source§fn eq(&self, other: &OnePassSig3) -> bool
fn eq(&self, other: &OnePassSig3) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> TryFrom<&'a Signature> for OnePassSig3
impl<'a> TryFrom<&'a Signature> for OnePassSig3
impl Eq for OnePassSig3
impl StructuralPartialEq for OnePassSig3
Auto Trait Implementations§
impl Freeze for OnePassSig3
impl RefUnwindSafe for OnePassSig3
impl Send for OnePassSig3
impl Sync for OnePassSig3
impl Unpin for OnePassSig3
impl UnwindSafe for OnePassSig3
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
)