Struct sequoia_autocrypt::AutocryptHeaders
source · pub struct AutocryptHeaders {
pub from: Option<String>,
pub headers: Vec<AutocryptHeader>,
}
Expand description
A set of parsed Autocrypt headers.
Fields§
§from: Option<String>
The value in the from header.
headers: Vec<AutocryptHeader>
Any autocrypt headers.
Implementations§
source§impl AutocryptHeaders
impl AutocryptHeaders
sourcepub fn from_bytes(data: &[u8]) -> Result<Self>
pub fn from_bytes(data: &[u8]) -> Result<Self>
Parses an autocrypt header.
data
should be all of a mail’s headers.
sourcepub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>
Parses an autocrypt header.
path
should name a file containing a single mail. If the
file is in mbox format, then only the first mail is
considered.
sourcepub fn from_reader<R: Read>(reader: R) -> Result<Self>
pub fn from_reader<R: Read>(reader: R) -> Result<Self>
Parses an autocrypt header.
reader
contain a single mail. If it contains multiple
emails, then only the first mail is considered.
Trait Implementations§
source§impl Debug for AutocryptHeaders
impl Debug for AutocryptHeaders
source§impl PartialEq<AutocryptHeaders> for AutocryptHeaders
impl PartialEq<AutocryptHeaders> for AutocryptHeaders
source§fn eq(&self, other: &AutocryptHeaders) -> bool
fn eq(&self, other: &AutocryptHeaders) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for AutocryptHeaders
Auto Trait Implementations§
impl !RefUnwindSafe for AutocryptHeaders
impl Send for AutocryptHeaders
impl Sync for AutocryptHeaders
impl Unpin for AutocryptHeaders
impl !UnwindSafe for AutocryptHeaders
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more