[][src]Enum pgp::packet::UserAttribute

pub enum UserAttribute {
    Image {
        packet_version: Version,
        header: Vec<u8>,
        data: Vec<u8>,
    },
    Unknown {
        packet_version: Version,
        typ: u8,
        data: Vec<u8>,
    },
}

User Attribute Packet https://tools.ietf.org/html/rfc4880.html#section-5.12

Variants

Image

Fields of Image

packet_version: Versionheader: Vec<u8>data: Vec<u8>
Unknown

Fields of Unknown

packet_version: Versiontyp: u8data: Vec<u8>

Methods

impl UserAttribute[src]

pub fn from_slice(packet_version: Version, input: &[u8]) -> Result<Self>[src]

Parses a UserAttribute packet from the given slice.

pub fn to_u8(&self) -> u8[src]

pub fn packet_len(&self) -> usize[src]

pub fn sign<F>(
    &self,
    key: &impl SecretKeyTrait,
    key_pw: F
) -> Result<SignedUserAttribute> where
    F: FnOnce() -> String
[src]

pub fn into_signed(self, sig: Signature) -> SignedUserAttribute[src]

Trait Implementations

impl PacketTrait for UserAttribute[src]

impl Serialize for UserAttribute[src]

impl From<UserAttribute> for Packet[src]

impl Clone for UserAttribute[src]

impl Eq for UserAttribute[src]

impl PartialEq<UserAttribute> for UserAttribute[src]

impl Display for UserAttribute[src]

impl Debug for UserAttribute[src]

impl TryFrom<Packet> for UserAttribute[src]

type Err = Error

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Err = <U as TryFrom<T>>::Err