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.
Sourcepub fn from_buffered_reader<R, C>(reader: R) -> Result<Self>
pub fn from_buffered_reader<R, C>(reader: R) -> Result<Self>
Parses an autocrypt header.
reader should be all of a mail’s headers.
Trait Implementations§
Source§impl Debug for AutocryptHeaders
impl Debug for AutocryptHeaders
Source§impl PartialEq for AutocryptHeaders
impl PartialEq for AutocryptHeaders
impl StructuralPartialEq for AutocryptHeaders
Auto Trait Implementations§
impl Freeze for AutocryptHeaders
impl RefUnwindSafe for AutocryptHeaders
impl Send for AutocryptHeaders
impl Sync for AutocryptHeaders
impl Unpin for AutocryptHeaders
impl UnsafeUnpin 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