Module template

Source
Expand description

Types to represent the HCL template sub-language.

Structs§

ElseTemplateExpr
A type representing the %{ else } sub-expression and the template that follows after it within an IfDirective.
EndforTemplateExpr
A type representing the %{ endfor } sub-expression within a ForDirective.
EndifTemplateExpr
A type representing the %{ endif } sub-expression within an IfDirective.
ForDirective
The template for directive is the template equivalent of the for expression, producing zero or more copies of its sub-template based on the elements of a collection.
ForTemplateExpr
A type representing the %{ for key_var, value_var in collection_expr } sub-expression and the template that follows after it within a ForDirective.
HeredocTemplate
A heredoc template is introduced by a << sequence and defines a template via a multi-line sequence terminated by a user-chosen delimiter.
IfDirective
The template if directive is the template equivalent of the conditional expression, allowing selection of one of two sub-templates based on the condition result.
IfTemplateExpr
A type representing the %{ if cond_expr } sub-expression and the template that follows after it within an IfDirective.
Interpolation
An interpolation sequence evaluates an expression (written in the expression sub-language), converts the result to a string value, and replaces itself with the resulting string.
StringTemplate
A type representing the HCL template sub-languange in the context of a quoted string literal.
Template
The main type to represent the HCL template sub-languange.

Enums§

Directive
A template directive that allows for conditional template evaluation.
Element
An element of an HCL template.
Strip
Controls the whitespace strip behaviour for template interpolations and directives on adjacent string literals.

Type Aliases§

IntoIter
An owning iterator over the elements of a Template.
Iter
An iterator over the elements of a Template.
IterMut
A mutable iterator over the elements of a Template.