Enum pgp::packet::UserAttribute
source · pub enum UserAttribute {
Image {
packet_version: Version,
header: Vec<u8>,
data: Vec<u8>,
},
Unknown {
packet_version: Version,
typ: u8,
data: Vec<u8>,
},
}
Expand description
User Attribute Packet https://tools.ietf.org/html/rfc4880.html#section-5.12
Variants§
Implementations§
source§impl UserAttribute
impl UserAttribute
sourcepub fn from_slice(packet_version: Version, input: &[u8]) -> Result<Self>
pub fn from_slice(packet_version: Version, input: &[u8]) -> Result<Self>
Parses a UserAttribute
packet from the given slice.
pub fn to_u8(&self) -> u8
pub fn packet_len(&self) -> usize
pub fn sign<F>( &self, key: &impl SecretKeyTrait, key_pw: F ) -> Result<SignedUserAttribute>where F: FnOnce() -> String,
pub fn into_signed(self, sig: Signature) -> SignedUserAttribute
Trait Implementations§
source§impl Clone for UserAttribute
impl Clone for UserAttribute
source§fn clone(&self) -> UserAttribute
fn clone(&self) -> UserAttribute
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 UserAttribute
impl Debug for UserAttribute
source§impl Display for UserAttribute
impl Display for UserAttribute
source§impl From<UserAttribute> for Packet
impl From<UserAttribute> for Packet
source§fn from(other: UserAttribute) -> Packet
fn from(other: UserAttribute) -> Packet
Converts to this type from the input type.
source§impl PacketTrait for UserAttribute
impl PacketTrait for UserAttribute
source§impl PartialEq<UserAttribute> for UserAttribute
impl PartialEq<UserAttribute> for UserAttribute
source§fn eq(&self, other: &UserAttribute) -> bool
fn eq(&self, other: &UserAttribute) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.