[][src]Struct sequoia_openpgp::packet::Header

pub struct Header {
    pub ctb: CTB,
    pub length: BodyLength,

An OpenPGP packet's header.


ctb: CTB

The packet's CTB.

length: BodyLength

The packet's length.


impl Header[src]

pub fn plausible<R: BufferedReader<C>, C>(reader: &mut R) -> Result<()>[src]

Returns whether the byte stream starts with a plausible OpenPGP header.

This is a heuristic.

This function does not consume any data from reader.

Trait Implementations

impl Serialize for Header[src]

fn to_vec(&self) -> Result<Vec<u8>>[src]

Serializes the packet to a vector.

impl<'a> Parse<'a, Header> for Header[src]

fn from_reader<R: 'a + Read>(reader: R) -> Result<Self>[src]

Parses an OpenPGP packet's header as described in Section 4.2 of RFC 4880.

fn from_file<P: AsRef<Path>>(path: P) -> Result<T>[src]

Reads from the given file. Read more

fn from_bytes(data: &'a [u8]) -> Result<T>[src]

Reads from the given slice. Read more

impl Clone for Header[src]

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

impl Debug for Header[src]

Auto Trait Implementations

impl Send for Header

impl Sync for Header

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized

impl<T> BorrowMut for T where
    T: ?Sized

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

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.