gleam/bbmustache

Types

pub type Argument
pub type CompileError {
  FileNotFound
  IncorrectSection(String)
  InvalidDelimiters
  UnclosedSection(String)
  UnclosedTag
  UnsupportedTag(String)
}

Constructors

  • FileNotFound
  • IncorrectSection(String)
  • InvalidDelimiters
  • UnclosedSection(String)
  • UnclosedTag
  • UnsupportedTag(String)
pub type Template

Functions

pub fn builder(of of: StringBuilder) -> Argument
pub fn compile(tmpl: String) -> Result(Template, CompileError)
pub fn compile_file(
  path: String,
) -> Result(Template, CompileError)
pub fn int(of of: Int) -> Argument
pub fn list(of of: List(Argument)) -> Argument
pub fn object(of of: List(#(String, Argument))) -> Argument
pub fn render(
  template: Template,
  injecting args: List(#(String, Argument)),
) -> String
pub fn string(of of: String) -> Argument
Search Document