Skip to main content

locate_template

Function locate_template 

Source
pub fn locate_template(
    source: &dyn TemplateSource,
    cli_path: Option<&Path>,
    max: usize,
) -> Result<Template, TemplateError>
Expand description

Finds the template: the command-line path, then the first existing candidate, then the built-in template.

ยงErrors

TemplateError::Unreadable when the command-line path cannot be read or holds more than max bytes, with no fallback, and TemplateError::Missing when no step supplies a template. A candidate over max bytes is passed over.