Struct sequoia_autocrypt::AutocryptSetupMessageParser [−][src]
A Parser for an AutocryptSetupMessage
.
Implementations
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
impl<'a> !RefUnwindSafe for AutocryptSetupMessageParser<'a>
impl<'a> Send for AutocryptSetupMessageParser<'a>
impl<'a> Sync for AutocryptSetupMessageParser<'a>
impl<'a> Unpin for AutocryptSetupMessageParser<'a>
impl<'a> !UnwindSafe for AutocryptSetupMessageParser<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,