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>
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 for UserAttribute
impl PartialEq 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 ==
.source§impl Serialize for UserAttribute
impl Serialize for UserAttribute
source§impl TryFrom<Packet> for UserAttribute
impl TryFrom<Packet> for UserAttribute
impl Eq for UserAttribute
impl StructuralPartialEq for UserAttribute
Auto Trait Implementations§
impl RefUnwindSafe for UserAttribute
impl Send for UserAttribute
impl Sync for UserAttribute
impl Unpin for UserAttribute
impl UnwindSafe for UserAttribute
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