pub struct TemplateBase<TE: TemplateEngine> { /* private fields */ }
Expand description

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 the path scheme and the string content as the iris “tail”.

Implementations

Couples the template base with a specific engine instance.``

Trait Implementations

Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.