[−][src]Struct mail_template::serde_impl::TemplateBase
Type used when deserializing a template using serde.
This type should only be used as intermediate type used for deserialization as templates need to be bundled with a template engine.
Serialize/Deserialize
The derserialization currently only works with self-describing data formats.
There are a number of shortcuts to deserialize resources (from emebddings and/or attachments):
- Resources can be deserialized normally (from a externally tagged enum)
- Resources can be deserialized from the serialized repr of
Source
- Resources can be deserialized from a string which is used to create
a
Resource::Source
with a iri using thepath
scheme and the string content as the iris "tail".
Methods
impl<TE> TemplateBase<TE> where
TE: TemplateEngine,
[src]
TE: TemplateEngine,
pub fn load(
self,
engine: TE,
default_base_dir: CwdBaseDir,
ctx: &impl Context
) -> impl Future<Item = Template<TE>, Error = Error>
[src]
self,
engine: TE,
default_base_dir: CwdBaseDir,
ctx: &impl Context
) -> impl Future<Item = Template<TE>, Error = Error>
Couples the template base with a specific engine instance.``
Trait Implementations
impl<TE: Debug + TemplateEngine> Debug for TemplateBase<TE> where
TE::LazyBodyTemplate: Debug,
[src]
TE::LazyBodyTemplate: Debug,
impl<TE: TemplateEngine> Serialize for TemplateBase<TE>
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de, TE: TemplateEngine> Deserialize<'de> for TemplateBase<TE>
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl<TE> Send for TemplateBase<TE> where
<TE as TemplateEngine>::LazyBodyTemplate: Send,
<TE as TemplateEngine>::LazyBodyTemplate: Send,
impl<TE> Sync for TemplateBase<TE> where
<TE as TemplateEngine>::LazyBodyTemplate: Sync,
<TE as TemplateEngine>::LazyBodyTemplate: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> HeaderTryFrom for T
[src]
fn try_from(val: T) -> Result<T, ComponentCreationError>
[src]
impl<F, T> HeaderTryInto for F where
T: HeaderTryFrom<F>,
[src]
T: HeaderTryFrom<F>,