pub struct ReplyTemplateBuilder<'a> {
pub interpreter: MimeInterpreterBuilder,
pub thread_interpreter: MimeInterpreterBuilder,
/* private fields */
}
Expand description
The message reply template builder.
This builder helps you to create a template in order to reply to an existing message.
Fields§
§interpreter: MimeInterpreterBuilder
Template interpreter instance.
thread_interpreter: MimeInterpreterBuilder
Template interpreter instance dedicated to the message thread.
Implementations§
Source§impl<'a> ReplyTemplateBuilder<'a>
impl<'a> ReplyTemplateBuilder<'a>
Sourcepub fn new(msg: &'a Message<'_>, config: Arc<AccountConfig>) -> Self
pub fn new(msg: &'a Message<'_>, config: Arc<AccountConfig>) -> Self
Creates a reply template builder from an account configuration and a message references.
Sourcepub fn with_headers(
self,
headers: impl IntoIterator<Item = (impl ToString, impl ToString)>,
) -> Self
pub fn with_headers( self, headers: impl IntoIterator<Item = (impl ToString, impl ToString)>, ) -> Self
Sets additional template headers following the builder pattern.
Sourcepub fn with_some_headers(
self,
headers: Option<impl IntoIterator<Item = (impl ToString, impl ToString)>>,
) -> Self
pub fn with_some_headers( self, headers: Option<impl IntoIterator<Item = (impl ToString, impl ToString)>>, ) -> Self
Sets some additional template headers following the builder pattern.
Sourcepub fn with_body(self, body: impl ToString) -> Self
pub fn with_body(self, body: impl ToString) -> Self
Sets the template body following the builder pattern.
Sourcepub fn with_some_body(self, body: Option<impl ToString>) -> Self
pub fn with_some_body(self, body: Option<impl ToString>) -> Self
Sets some template body following the builder pattern.
Sourcepub fn set_some_posting_style(
&mut self,
style: Option<impl Into<ReplyTemplatePostingStyle>>,
)
pub fn set_some_posting_style( &mut self, style: Option<impl Into<ReplyTemplatePostingStyle>>, )
Set some posting style.
Sourcepub fn set_posting_style(&mut self, style: impl Into<ReplyTemplatePostingStyle>)
pub fn set_posting_style(&mut self, style: impl Into<ReplyTemplatePostingStyle>)
Set the posting style.
Sourcepub fn with_some_posting_style(
self,
style: Option<impl Into<ReplyTemplatePostingStyle>>,
) -> Self
pub fn with_some_posting_style( self, style: Option<impl Into<ReplyTemplatePostingStyle>>, ) -> Self
Set some posting style, using the builder pattern.
Sourcepub fn with_posting_style(
self,
style: impl Into<ReplyTemplatePostingStyle>,
) -> Self
pub fn with_posting_style( self, style: impl Into<ReplyTemplatePostingStyle>, ) -> Self
Set the posting style, using the builder pattern.
Sourcepub fn set_some_signature_style(
&mut self,
style: Option<impl Into<ReplyTemplateSignatureStyle>>,
)
pub fn set_some_signature_style( &mut self, style: Option<impl Into<ReplyTemplateSignatureStyle>>, )
Set some signature style.
Sourcepub fn set_signature_style(
&mut self,
style: impl Into<ReplyTemplateSignatureStyle>,
)
pub fn set_signature_style( &mut self, style: impl Into<ReplyTemplateSignatureStyle>, )
Set the signature style.
Sourcepub fn with_some_signature_style(
self,
style: Option<impl Into<ReplyTemplateSignatureStyle>>,
) -> Self
pub fn with_some_signature_style( self, style: Option<impl Into<ReplyTemplateSignatureStyle>>, ) -> Self
Set some signature style, using the builder pattern.
Sourcepub fn with_signature_style(
self,
style: impl Into<ReplyTemplateSignatureStyle>,
) -> Self
pub fn with_signature_style( self, style: impl Into<ReplyTemplateSignatureStyle>, ) -> Self
Set the signature style, using the builder pattern.
Sourcepub fn with_interpreter(self, interpreter: MimeInterpreterBuilder) -> Self
pub fn with_interpreter(self, interpreter: MimeInterpreterBuilder) -> Self
Set the template interpreter following the builder pattern.
Sourcepub fn with_thread_interpreter(
self,
interpreter: MimeInterpreterBuilder,
) -> Self
pub fn with_thread_interpreter( self, interpreter: MimeInterpreterBuilder, ) -> Self
Set the template thread interpreter following the builder pattern.
Sourcepub fn with_reply_all(self, all: bool) -> Self
pub fn with_reply_all(self, all: bool) -> Self
Set the reply all flag following the builder pattern.
Auto Trait Implementations§
impl<'a> Freeze for ReplyTemplateBuilder<'a>
impl<'a> !RefUnwindSafe for ReplyTemplateBuilder<'a>
impl<'a> Send for ReplyTemplateBuilder<'a>
impl<'a> Sync for ReplyTemplateBuilder<'a>
impl<'a> Unpin for ReplyTemplateBuilder<'a>
impl<'a> !UnwindSafe for ReplyTemplateBuilder<'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
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>
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>
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