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
Image
Unknown
Implementations
sourceimpl 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
sourceimpl Clone for UserAttribute
impl Clone for UserAttribute
sourcefn clone(&self) -> UserAttribute
fn clone(&self) -> UserAttribute
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 UserAttribute
impl Debug for UserAttribute
sourceimpl Display for UserAttribute
impl Display for UserAttribute
sourceimpl From<UserAttribute> for Packet
impl From<UserAttribute> for Packet
sourcefn from(other: UserAttribute) -> Packet
fn from(other: UserAttribute) -> Packet
Converts to this type from the input type.
sourceimpl PacketTrait for UserAttribute
impl PacketTrait for UserAttribute
sourceimpl PartialEq<UserAttribute> for UserAttribute
impl PartialEq<UserAttribute> for UserAttribute
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &UserAttribute) -> bool
fn ne(&self, other: &UserAttribute) -> bool
This method tests for !=
.
sourceimpl Serialize for UserAttribute
impl Serialize for UserAttribute
sourceimpl TryFrom<Packet> for UserAttribute
impl TryFrom<Packet> for UserAttribute
impl Eq for UserAttribute
impl StructuralEq 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
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