pub struct NewTemplateBuilder {
pub interpreter: MimeInterpreterBuilder,
/* private fields */
}
Expand description
The new template builder.
This builder helps you to create a template in order to compose a new message from scratch.
Fields§
§interpreter: MimeInterpreterBuilder
Template interpreter instance.
Implementations§
Source§impl NewTemplateBuilder
impl NewTemplateBuilder
Sourcepub fn new(config: Arc<AccountConfig>) -> Self
pub fn new(config: Arc<AccountConfig>) -> Self
Create a new template builder from an account configuration.
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
Set 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
Set 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_signature_style(
&mut self,
style: Option<impl Into<NewTemplateSignatureStyle>>,
)
pub fn set_some_signature_style( &mut self, style: Option<impl Into<NewTemplateSignatureStyle>>, )
Set some signature style.
Sourcepub fn set_signature_style(
&mut self,
style: impl Into<NewTemplateSignatureStyle>,
)
pub fn set_signature_style( &mut self, style: impl Into<NewTemplateSignatureStyle>, )
Set the signature style.
Sourcepub fn with_some_signature_style(
self,
style: Option<impl Into<NewTemplateSignatureStyle>>,
) -> Self
pub fn with_some_signature_style( self, style: Option<impl Into<NewTemplateSignatureStyle>>, ) -> Self
Set some signature style, using the builder pattern.
Sourcepub fn with_signature_style(
self,
style: impl Into<NewTemplateSignatureStyle>,
) -> Self
pub fn with_signature_style( self, style: impl Into<NewTemplateSignatureStyle>, ) -> 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.
Auto Trait Implementations§
impl Freeze for NewTemplateBuilder
impl !RefUnwindSafe for NewTemplateBuilder
impl Send for NewTemplateBuilder
impl Sync for NewTemplateBuilder
impl Unpin for NewTemplateBuilder
impl !UnwindSafe for NewTemplateBuilder
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