Default HEEx template engine for mailglass.
Renders a pre-compiled Phoenix function component by calling it with the
provided assigns and converting the result to iodata via Phoenix.HTML.Safe.
Usage
HEEx templates are compiled by the Phoenix tag engine at build time. Callers
pass the already-compiled function component (a fn assigns -> ... end or
&MyModule.component/1) directly to render/3. The compile/2 callback
returns {:ok, :heex_native} for API symmetry.
Error Handling
- Missing assign (
KeyError) →{:error, %Mailglass.TemplateError{type: :missing_assign}} - Argument errors during render →
{:error, %Mailglass.TemplateError{type: :missing_assign}} - Any other runtime error →
{:error, %Mailglass.TemplateError{type: :heex_compile}} - Non-function
compiledargument →{:error, %Mailglass.TemplateError{type: :heex_compile}}