Trait sequoia_openpgp::parse::Parse

source ·
pub trait Parse<'a, T> {
    // Required method
    fn from_reader<R: 'a + Read + Send + Sync>(reader: R) -> Result<T>;

    // Provided methods
    fn from_buffered_reader<R>(reader: R) -> Result<T>
       where R: BufferedReader<Cookie> + 'a { ... }
    fn from_file<P: AsRef<Path>>(path: P) -> Result<T> { ... }
    fn from_bytes<D: AsRef<[u8]> + ?Sized + Send + Sync>(
        data: &'a D,
    ) -> Result<T> { ... }
}
Expand description

Parsing of packets and related structures.

This is a uniform interface to parse packets, messages, keys, and related data structures.

Required Methods§

source

fn from_reader<R: 'a + Read + Send + Sync>(reader: R) -> Result<T>

Reads from the given reader.

Provided Methods§

source

fn from_buffered_reader<R>(reader: R) -> Result<T>
where R: BufferedReader<Cookie> + 'a,

Reads from the given buffered reader.

source

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

Reads from the given file.

The default implementation just uses from_reader(..), but implementations can provide their own specialized version.

source

fn from_bytes<D: AsRef<[u8]> + ?Sized + Send + Sync>(data: &'a D) -> Result<T>

Reads from the given slice.

The default implementation just uses from_reader(..), but implementations can provide their own specialized version.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a> Parse<'a, S2K> for S2K

source§

impl<'a> Parse<'a, Packet> for Packet

source§

impl<'a> Parse<'a, AED> for AED

source§

impl<'a> Parse<'a, Key<UnspecifiedParts, UnspecifiedRole>> for Key<UnspecifiedParts, UnspecifiedRole>

source§

impl<'a> Parse<'a, OnePassSig> for OnePassSig

source§

impl<'a> Parse<'a, PKESK> for PKESK

source§

impl<'a> Parse<'a, SEIP> for SEIP

source§

impl<'a> Parse<'a, SKESK> for SKESK

source§

impl<'a> Parse<'a, Signature> for Signature

source§

impl<'a> Parse<'a, PacketParserResult<'a>> for PacketParser<'a>

source§

impl<'a> Parse<'a, RawCert<'a>> for RawCert<'a>

source§

impl<'a> Parse<'a, RawCertParser<'a>> for RawCertParser<'a>

source§

impl<'a> Parse<'a, CertParser<'a>> for CertParser<'a>

source§

impl<'a> Parse<'a, MPI> for MPI

source§

impl<'a> Parse<'a, Header> for Header

source§

impl<'a> Parse<'a, OnePassSig3> for OnePassSig3

source§

impl<'a> Parse<'a, PKESK3> for PKESK3

source§

impl<'a> Parse<'a, CompressedData> for CompressedData

source§

impl<'a> Parse<'a, Literal> for Literal

source§

impl<'a> Parse<'a, MDC> for MDC

source§

impl<'a> Parse<'a, Marker> for Marker

source§

impl<'a> Parse<'a, Trust> for Trust

source§

impl<'a> Parse<'a, UserID> for UserID

source§

impl<'a> Parse<'a, UserAttribute> for UserAttribute

source§

impl<'a> Parse<'a, Cert> for Cert

source§

impl<'a> Parse<'a, Message> for Message

source§

impl<'a> Parse<'a, PacketPile> for PacketPile

source§

impl<'a> Parse<'a, DecryptorBuilder<'a>> for DecryptorBuilder<'a>

source§

impl<'a> Parse<'a, DetachedVerifierBuilder<'a>> for DetachedVerifierBuilder<'a>

source§

impl<'a> Parse<'a, VerifierBuilder<'a>> for VerifierBuilder<'a>

source§

impl<'a> Parse<'a, PacketParserBuilder<'a>> for PacketParserBuilder<'a>

source§

impl<'a> Parse<'a, PacketPileParser<'a>> for PacketPileParser<'a>