handbar 0.0.5

Fork of Handlebars.
#[derive(Clone, Copy)]
pub enum HelperName {
    If,
    IfTernary,
    Unless,
    UnlessTernary,
    Each,
    With,
    Lookup,
    Raw,
    Log,
    Error,
    ErrorIf,
    ErrorUnless,
    Get,
    Append,
    Prepend,
    Insert,
    Remove,
    Ctx,
    Var,
    Indent,
    Json,
    ReadDir,
    ReadFile,
    Env,
    Default,
    Split,
    EQ,
    NE,
    GT,
    GTE,
    LT,
    LTE,
    And,
    Or,
    Not,
    Len,
    Exists,
    NotExists,
    StartsWith,
    EndsWith,
    Contains,
    Inline,
}

impl std::fmt::Display for HelperName {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        use HelperName::*;

        let val = match self {
            If => "if",
            IfTernary => "if_ternary",
            Unless => "unless",
            UnlessTernary => "unless_ternary",
            Each => "each",
            With => "with",
            Lookup => "lookup",
            Raw => "raw",
            Log => "log",
            Error => "error",
            ErrorIf => "error_if",
            ErrorUnless => "error_unless",
            Get => "get",
            Append => "append",
            Prepend => "prepend",
            Insert => "insert",
            Remove => "remove",
            Ctx => "ctx",
            Var => "var",
            Indent => "indent",
            Json => "json",
            ReadDir => "read_dir",
            ReadFile => "read_file",
            Env => "env",
            Default => "default",
            Split => "split",
            EQ => "eq",
            NE => "ne",
            GT => "gt",
            GTE => "gte",
            LT => "lt",
            LTE => "lte",
            And => "and",
            Or => "or",
            Not => "not",
            Len => "len",
            Exists => "exists",
            NotExists => "not_exists",
            StartsWith => "starts_with",
            EndsWith => "ends_with",
            Contains => "contains",
            Inline => "inline",
        }
        .to_string();

        write!(f, "{}", val)
    }
}