Module templater

Module templater 

Source
Expand description

Tools for lazily evaluating templates that produce text in a fallible manner.

Structs§

CoalesceTemplate
Renders contents in order, and returns the first non-empty output.
ConcatTemplate
ConditionalTemplate
Template which selects an output based on a boolean condition.
Email
FormattablePropertyTemplate
Adapter to extract template value from property for displaying.
JoinTemplate
Like ConcatTemplate, but inserts a separator between contents.
LabelTemplate
ListPropertyTemplate
Renders template property of list type with the given separator.
Literal
Adapter that wraps literal value in TemplateProperty.
PlainTextFormattedProperty
Adapter to turn template back to string property.
PropertyPlaceholder
Property which will be compiled into template once, and substituted later.
RawEscapeSequenceTemplate
ReformatTemplate
Renders the content to buffer, and transforms it without losing labels.
SeparateTemplate
Like JoinTemplate, but ignores empty contents.
TemplateFormatter
Wrapper to pass around Formatter and error handler.
TemplateFunction
Adapter to apply fallible function to the property.
TemplatePropertyError
Wrapper around an error occurred during template evaluation.
TemplateRenderer
Adapter that renders compiled template with the placeholder value set.

Traits§

ListTemplate
Template that supports list-like behavior.
Template
Represents a printable type or a compiled template containing a placeholder value.
TemplateProperty
Lazily evaluated value which can fail to evaluate.
TemplatePropertyExt
TemplateProperty adapters that are useful when implementing methods.
WrapTemplateProperty
Wraps template property of type O in tagged type.

Functions§

format_joined

Type Aliases§

BoxedSerializeProperty
BoxedTemplateProperty
Type-erased TemplateProperty.
SizeHint