Skip to main content

EmbeddedTemplates

Type Alias EmbeddedTemplates 

Source
pub type EmbeddedTemplates = EmbeddedSource<TemplateResource>;
Expand description

Type alias for embedded templates.

Aliased Type§

pub struct EmbeddedTemplates {
    pub entries: &'static [(&'static str, &'static str)],
    pub source_path: &'static str,
    /* private fields */
}

Fields§

§entries: &'static [(&'static str, &'static str)]

The embedded entries as (name_with_extension, content) pairs. This is 'static because it’s baked into the binary at compile time.

§source_path: &'static str

The source path used for embedding. In debug mode, if this path exists, files are read from disk instead.