Struct eml_parser::parser::EmlParser
source · [−]pub struct EmlParser { /* private fields */ }Implementations
sourceimpl EmlParser
impl EmlParser
sourcepub fn from_file(filename: impl AsRef<Path>) -> Result<Self, EmlError>
pub fn from_file(filename: impl AsRef<Path>) -> Result<Self, EmlError>
Read an .eml file from disk, parsing its contents.
Note that the current implementation loads the entire file to memory since std::fs::File
doesn’t provide an iterator over char that could give a Peekable.
pub fn from_string(content: String) -> Self
pub fn ignore_body(self) -> Self
pub fn with_body(self) -> Self
pub fn with_body_preview(self, bytes: usize) -> Self
pub fn parse(&mut self) -> Result<Eml, EmlError>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for EmlParser
impl Send for EmlParser
impl Sync for EmlParser
impl Unpin for EmlParser
impl UnwindSafe for EmlParser
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more