[][src]Struct sequoia_openpgp::autocrypt::AutocryptSetupMessageParser

pub struct AutocryptSetupMessageParser<'a> { /* fields omitted */ }

A Parser for an AutocryptSetupMessage.

Methods

impl<'a> AutocryptSetupMessageParser<'a>[src]

pub fn passcode_format(&self) -> Option<&str>[src]

Returns the "Passcode-Format" header.

pub fn passcode_begin(&self) -> Option<&str>[src]

Returns the "Passcode-Begin" header.

pub fn decrypt(&mut self, passcode: &Password) -> Result<()>[src]

Tries to decrypt the message.

On success, follow up with AutocryptSetupMessageParser::parse() to extract the AutocryptSetupMessage.

pub fn parse(self) -> Result<AutocryptSetupMessage>[src]

Finishes parsing the AutocryptSetupMessage.

Before calling this, you must decrypt the payload using decrypt.

If the payload has not been decrypted, returns Error::InvalidOperation.

If the payload is malformed, returns Error::MalformedMessage.

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

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

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.

impl<V, T> VZip for T where
    V: MultiLane<T>,