[][src]Struct sequoia_openpgp::packet::signature::subpacket::SubpacketArea

pub struct SubpacketArea {
    pub data: Vec<u8>,
    // some fields omitted
}

Subpacket area.

Fields

data: Vec<u8>

Raw, unparsed subpacket data.

Methods

impl SubpacketArea[src]

pub fn new(data: Vec<u8>) -> SubpacketArea[src]

Returns a new subpacket area based on data.

pub fn empty() -> SubpacketArea[src]

Returns a empty subpacket area.

impl SubpacketArea[src]

Important traits for Iter<'a>
pub fn iter<'a>(&'a self) -> Iter<'a>[src]

Iterates over the subpackets.

pub fn lookup(&self, tag: SubpacketTag) -> Option<Subpacket>[src]

Returns the last subpacket, if any, with the specified tag.

pub fn add(&mut self, packet: Subpacket) -> Result<()>[src]

Adds the given subpacket.

Errors

Returns Error::MalformedPacket if adding the packet makes the subpacket area exceed the size limit.

pub fn replace(&mut self, packet: Subpacket) -> Result<()>[src]

Adds the given subpacket, replacing all other subpackets with the same tag.

Errors

Returns Error::MalformedPacket if adding the packet makes the subpacket area exceed the size limit.

pub fn remove_all(&mut self, tag: SubpacketTag) -> Vec<u8>[src]

Removes all subpackets with the given tag.

Returns the old subpacket area, so that it can be restored if necessary.

pub fn clear(&mut self)[src]

Removes all subpackets.

Trait Implementations

impl Eq for SubpacketArea[src]

impl PartialEq<SubpacketArea> for SubpacketArea[src]

impl Clone for SubpacketArea[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Hash for SubpacketArea[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for SubpacketArea[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.