#[non_exhaustive]pub enum EmailTemplate {
EmailVerification {
url: String,
username: String,
},
PasswordReset {
url: String,
username: String,
},
MfaRecovery {
codes: Vec<String>,
username: String,
},
Invitation {
url: String,
invited_by: String,
},
}Expand description
Typed email template variants.
#[non_exhaustive] ensures future variants (e.g. TransferNotification)
can be added in c8m.2/c8m.3 without a breaking API change. Sender
implementations must include a catch-all arm on exhaustive matches.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
EmailVerification
PasswordReset
MfaRecovery
Invitation
Workspace or service invitation.
invited_by carries a display name — either a person’s display name
(standalone server context) or an organisation name (saas context).
Sender implementations should render it as-is.
Trait Implementations§
Source§impl Clone for EmailTemplate
impl Clone for EmailTemplate
Source§fn clone(&self) -> EmailTemplate
fn clone(&self) -> EmailTemplate
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 moreAuto Trait Implementations§
impl Freeze for EmailTemplate
impl RefUnwindSafe for EmailTemplate
impl Send for EmailTemplate
impl Sync for EmailTemplate
impl Unpin for EmailTemplate
impl UnsafeUnpin for EmailTemplate
impl UnwindSafe for EmailTemplate
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,
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