pub struct Message<'a> { /* private fields */ }
Expand description
The self-referencing struct.
Implementations§
Source§impl Message<'_>
impl Message<'_>
Sourcepub fn download_parts(&self, dest: impl AsRef<Path>) -> Result<PathBuf, Error>
pub fn download_parts(&self, dest: impl AsRef<Path>) -> Result<PathBuf, Error>
Downloads parts in the given destination.
Sourcepub fn attachments(&self) -> Result<Vec<Attachment>, Error>
pub fn attachments(&self) -> Result<Vec<Attachment>, Error>
Returns the list of message attachment.
Sourcepub fn new_tpl_builder(config: Arc<AccountConfig>) -> NewTemplateBuilder
pub fn new_tpl_builder(config: Arc<AccountConfig>) -> NewTemplateBuilder
Creates a new template builder from an account configuration.
Sourcepub async fn to_read_tpl(
&self,
config: &AccountConfig,
with_interpreter: impl Fn(MimeInterpreterBuilder) -> MimeInterpreterBuilder,
) -> Result<Template, Error>
pub async fn to_read_tpl( &self, config: &AccountConfig, with_interpreter: impl Fn(MimeInterpreterBuilder) -> MimeInterpreterBuilder, ) -> Result<Template, Error>
Turns the current message into a read.
Sourcepub fn to_reply_tpl_builder(
&self,
config: Arc<AccountConfig>,
) -> ReplyTemplateBuilder<'_>
pub fn to_reply_tpl_builder( &self, config: Arc<AccountConfig>, ) -> ReplyTemplateBuilder<'_>
Turns the current message into a reply template builder.
The fact to return a template builder makes it easier to customize the final template from the outside.
Sourcepub fn to_forward_tpl_builder(
&self,
config: Arc<AccountConfig>,
) -> ForwardTemplateBuilder<'_>
pub fn to_forward_tpl_builder( &self, config: Arc<AccountConfig>, ) -> ForwardTemplateBuilder<'_>
Turns the current message into a forward template builder.
The fact to return a template builder makes it easier to customize the final template from the outside.
Trait Implementations§
Source§impl<'a> From<&'a mut MaildirEntry> for Message<'a>
impl<'a> From<&'a mut MaildirEntry> for Message<'a>
Source§fn from(entry: &'a mut MaildirEntry) -> Self
fn from(entry: &'a mut MaildirEntry) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for Message<'a>
impl<'a> RefUnwindSafe for Message<'a>
impl<'a> Send for Message<'a>
impl<'a> Sync for Message<'a>
impl<'a> Unpin for Message<'a>
impl<'a> UnwindSafe for Message<'a>
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more