pub enum EmailContent {
Rendered(RenderedEmail),
FromMKind {
context: Option<Map<String, Value>>,
},
}
Expand description
The content of the email to send. Most fastn apps should prefer EmailContent::FromMKind as that allows end users of the fastn app to configure the email easily. The EmailContent::Rendered variant is allowed if you want to generate emails though some other mechanism.
Variants§
Rendered(RenderedEmail)
FromMKind
You can pass context data to EmailContent::FromMKind to be used when rendering the email
content. The context
is passed to /<app-url>/mail/<mkind>/
as request data, and can be
used by the templating layer to include in the subject/html/text content of the mail.
Trait Implementations§
Source§impl Clone for EmailContent
impl Clone for EmailContent
Source§fn clone(&self) -> EmailContent
fn clone(&self) -> EmailContent
Returns a copy of the value. Read more
1.0.0 · 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 EmailContent
impl Debug for EmailContent
Source§impl Default for EmailContent
impl Default for EmailContent
Source§fn default() -> EmailContent
fn default() -> EmailContent
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EmailContent
impl<'de> Deserialize<'de> for EmailContent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EmailContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EmailContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for EmailContent
impl Serialize for EmailContent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for EmailContent
impl RefUnwindSafe for EmailContent
impl Send for EmailContent
impl Sync for EmailContent
impl Unpin for EmailContent
impl UnwindSafe for EmailContent
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> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read more