Struct stache::Name [] [src]

pub struct Name {
    pub base: String,
    // some fields omitted
}

An identifier name generator.

Fields

Methods

impl Name
[src]

Initialize a name generator with a base name. A unique identifier may then be generated with the next and to_string functions.

Advances the generator to the next unique identifier. When passing a Name through recursive function calls, this can be called before the next recursion to increment the depth of the generated identifiers.

impl Name
[src]

Creates a valid identifier from the template's short name to be used in function or variable names generated from this template file: include/header -> include_header.

Trait Implementations

impl Debug for Name
[src]

Formats the value using the given formatter.

impl Display for Name
[src]

Creates a unique identifier to be used as a variable or function name.