Struct mml::body::interpreter::MimeBodyInterpreter
source · pub struct MimeBodyInterpreter { /* private fields */ }
Expand description
The MML interpreter interprets full emails as [crate::Tpl
]. The
interpreter needs to be customized first. The customization
follows the builder pattern. When the interpreter is customized,
calling any function matching interpret_*()
consumes the
interpreter and generates the final [crate::Tpl
].
Implementations§
source§impl MimeBodyInterpreter
impl MimeBodyInterpreter
pub fn new() -> Self
pub fn show_multiparts(self, b: bool) -> Self
pub fn filter_parts(self, f: FilterParts) -> Self
pub fn show_plain_texts_signature(self, b: bool) -> Self
pub fn show_attachments(self, b: bool) -> Self
pub fn show_inline_attachments(self, b: bool) -> Self
pub fn save_attachments(self, b: bool) -> Self
pub fn save_attachments_dir<D>(self, dir: D) -> Selfwhere D: Into<PathBuf>,
sourcepub async fn interpret_msg<'a>(&self, msg: &Message<'a>) -> Result<String>
pub async fn interpret_msg<'a>(&self, msg: &Message<'a>) -> Result<String>
Interprets the given mail_parser::Message
as a MML string.
sourcepub async fn interpret_bytes<'a>(
&self,
bytes: impl AsRef<[u8]> + 'a
) -> Result<String>
pub async fn interpret_bytes<'a>( &self, bytes: impl AsRef<[u8]> + 'a ) -> Result<String>
Interprets the given bytes as a MML string.
sourcepub async fn interpret_msg_builder<'a>(
&self,
builder: MessageBuilder<'a>
) -> Result<String>
pub async fn interpret_msg_builder<'a>( &self, builder: MessageBuilder<'a> ) -> Result<String>
Interprets the given mail_builder::MessageBuilder
as a MML
string.
Trait Implementations§
source§impl Clone for MimeBodyInterpreter
impl Clone for MimeBodyInterpreter
source§fn clone(&self) -> MimeBodyInterpreter
fn clone(&self) -> MimeBodyInterpreter
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MimeBodyInterpreter
impl Debug for MimeBodyInterpreter
source§impl Default for MimeBodyInterpreter
impl Default for MimeBodyInterpreter
source§impl PartialEq<MimeBodyInterpreter> for MimeBodyInterpreter
impl PartialEq<MimeBodyInterpreter> for MimeBodyInterpreter
source§fn eq(&self, other: &MimeBodyInterpreter) -> bool
fn eq(&self, other: &MimeBodyInterpreter) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for MimeBodyInterpreter
impl StructuralEq for MimeBodyInterpreter
impl StructuralPartialEq for MimeBodyInterpreter
Auto Trait Implementations§
impl RefUnwindSafe for MimeBodyInterpreter
impl Send for MimeBodyInterpreter
impl Sync for MimeBodyInterpreter
impl Unpin for MimeBodyInterpreter
impl UnwindSafe for MimeBodyInterpreter
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.