CommBus.Template.Engine.ExMustache (CommBus v0.1.0)

Copy Markdown View Source

ExMustache-based template engine.

Summary

Functions

Renders a Mustache template using the ExMustache pure-Elixir library with support for strict mode, type coercion, partial resolution, default values, and control tag rewriting.

Functions

render(template, values, opts \\ [])

Renders a Mustache template using the ExMustache pure-Elixir library with support for strict mode, type coercion, partial resolution, default values, and control tag rewriting.

Parameters

  • template — A Mustache template string.
  • values — A map of variable bindings (keys are stringified).
  • opts — Keyword options: :strict_mode, :template_name, :types, :partials, :partials_func.

Returns

{:ok, %RenderResult{}} on success or {:error, %RenderError{}} on failure.