Struct mml::message::interpreter::MimeInterpreterBuilder
source · pub struct MimeInterpreterBuilder {
show_headers: FilterHeaders,
mime_body_interpreter: MimeBodyInterpreter,
}
interpreter
only.Expand description
MIME → MML message interpreter builder.
Fields§
§show_headers: FilterHeaders
The strategy to display headers.
mime_body_interpreter: MimeBodyInterpreter
The internal MIME to MML message body interpreter.
Implementations§
source§impl MimeInterpreterBuilder
impl MimeInterpreterBuilder
sourcepub fn with_show_headers(self, s: FilterHeaders) -> Self
pub fn with_show_headers(self, s: FilterHeaders) -> Self
Filter headers with the given strategy.
sourcepub fn with_show_all_headers(self) -> Self
pub fn with_show_all_headers(self) -> Self
Show all headers.
sourcepub fn with_show_only_headers(
self,
headers: impl IntoIterator<Item = impl ToString>
) -> Self
pub fn with_show_only_headers( self, headers: impl IntoIterator<Item = impl ToString> ) -> Self
Show only headers matching the given ones.
sourcepub fn with_show_additional_headers(
self,
headers: impl IntoIterator<Item = impl ToString>
) -> Self
pub fn with_show_additional_headers( self, headers: impl IntoIterator<Item = impl ToString> ) -> Self
Show additional headers.
sourcepub fn with_hide_all_headers(self) -> Self
pub fn with_hide_all_headers(self) -> Self
Hide all headers.
sourcepub fn with_show_multiparts(self, b: bool) -> Self
pub fn with_show_multiparts(self, b: bool) -> Self
Show MML multipart tags.
sourcepub fn with_filter_parts(self, f: FilterParts) -> Self
pub fn with_filter_parts(self, f: FilterParts) -> Self
Filter parts using the given strategy.
sourcepub fn with_show_plain_texts_signature(self, b: bool) -> Self
pub fn with_show_plain_texts_signature(self, b: bool) -> Self
Show plain texts signature.
sourcepub fn with_show_attachments(self, b: bool) -> Self
pub fn with_show_attachments(self, b: bool) -> Self
Show MML attachments tags.
sourcepub fn with_show_inline_attachments(self, b: bool) -> Self
pub fn with_show_inline_attachments(self, b: bool) -> Self
Show MML inline attachments tags.
sourcepub fn with_save_attachments(self, b: bool) -> Self
pub fn with_save_attachments(self, b: bool) -> Self
Automatically save attachments to the save_attachments_dir
.
sourcepub fn with_save_attachments_dir(self, dir: impl Into<PathBuf>) -> Self
pub fn with_save_attachments_dir(self, dir: impl Into<PathBuf>) -> Self
Customize the download attachments directory.
This can be used to display the filename
property but also
to automatically save attachment with save_attachments
.
sourcepub fn with_save_some_attachments_dir(
self,
dir: Option<impl Into<PathBuf>>
) -> Self
pub fn with_save_some_attachments_dir( self, dir: Option<impl Into<PathBuf>> ) -> Self
Customize the download attachments directory using an optional path.
This can be used to display the filename
property but also
to automatically save attachment with save_attachments
.
sourcepub fn set_pgp(&mut self, pgp: impl Into<Pgp>)
Available on crate feature pgp
only.
pub fn set_pgp(&mut self, pgp: impl Into<Pgp>)
pgp
only.Customize PGP.
sourcepub fn with_pgp(self, pgp: impl Into<Pgp>) -> Self
Available on crate feature pgp
only.
pub fn with_pgp(self, pgp: impl Into<Pgp>) -> Self
pgp
only.Customize PGP.
sourcepub fn set_some_pgp(&mut self, pgp: Option<impl Into<Pgp>>)
Available on crate feature pgp
only.
pub fn set_some_pgp(&mut self, pgp: Option<impl Into<Pgp>>)
pgp
only.Customize some PGP.
sourcepub fn with_some_pgp(self, pgp: Option<impl Into<Pgp>>) -> Self
Available on crate feature pgp
only.
pub fn with_some_pgp(self, pgp: Option<impl Into<Pgp>>) -> Self
pgp
only.Customize some PGP.
sourcepub fn build(self) -> MimeInterpreter
pub fn build(self) -> MimeInterpreter
Build the final MimeInterpreter.
This intermediate step is not necessary for the interpreter, the aim is just to have a common API with the compiler.
Trait Implementations§
source§impl Clone for MimeInterpreterBuilder
impl Clone for MimeInterpreterBuilder
source§fn clone(&self) -> MimeInterpreterBuilder
fn clone(&self) -> MimeInterpreterBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MimeInterpreterBuilder
impl Debug for MimeInterpreterBuilder
source§impl Default for MimeInterpreterBuilder
impl Default for MimeInterpreterBuilder
source§fn default() -> MimeInterpreterBuilder
fn default() -> MimeInterpreterBuilder
source§impl PartialEq for MimeInterpreterBuilder
impl PartialEq for MimeInterpreterBuilder
source§fn eq(&self, other: &MimeInterpreterBuilder) -> bool
fn eq(&self, other: &MimeInterpreterBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for MimeInterpreterBuilder
impl StructuralPartialEq for MimeInterpreterBuilder
Auto Trait Implementations§
impl Freeze for MimeInterpreterBuilder
impl !RefUnwindSafe for MimeInterpreterBuilder
impl Send for MimeInterpreterBuilder
impl Sync for MimeInterpreterBuilder
impl Unpin for MimeInterpreterBuilder
impl !UnwindSafe for MimeInterpreterBuilder
Blanket Implementations§
source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
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
source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.