pub struct MailTemplateDefinition {
pub code: &'static str,
pub category: &'static str,
pub label_i18n_key: &'static str,
pub variables: &'static [TemplateVariableSpec],
}Expand description
Registered metadata for one product mail template.
Fields§
§code: &'static strStable product template code.
category: &'static strProduct-owned configuration category.
label_i18n_key: &'static strProduct-owned i18n group label key.
variables: &'static [TemplateVariableSpec]Variables accepted by the template.
Implementations§
Source§impl MailTemplateDefinition
impl MailTemplateDefinition
Sourcepub const fn new(
code: &'static str,
category: &'static str,
label_i18n_key: &'static str,
variables: &'static [TemplateVariableSpec],
) -> Self
pub const fn new( code: &'static str, category: &'static str, label_i18n_key: &'static str, variables: &'static [TemplateVariableSpec], ) -> Self
Creates a registered template definition.
Sourcepub fn variable_group(&self) -> TemplateVariableGroup
pub fn variable_group(&self) -> TemplateVariableGroup
Converts this definition into API-facing variable metadata.
Trait Implementations§
Source§impl Clone for MailTemplateDefinition
impl Clone for MailTemplateDefinition
Source§fn clone(&self) -> MailTemplateDefinition
fn clone(&self) -> MailTemplateDefinition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MailTemplateDefinition
impl Debug for MailTemplateDefinition
Source§impl PartialEq for MailTemplateDefinition
impl PartialEq for MailTemplateDefinition
Source§fn eq(&self, other: &MailTemplateDefinition) -> bool
fn eq(&self, other: &MailTemplateDefinition) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for MailTemplateDefinition
impl StructuralPartialEq for MailTemplateDefinition
Auto Trait Implementations§
impl Freeze for MailTemplateDefinition
impl RefUnwindSafe for MailTemplateDefinition
impl Send for MailTemplateDefinition
impl Sync for MailTemplateDefinition
impl Unpin for MailTemplateDefinition
impl UnsafeUnpin for MailTemplateDefinition
impl UnwindSafe for MailTemplateDefinition
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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