Skip to main content

parse

Function parse 

Source
pub fn parse<'a>(
    input_file: impl AsRef<Path>,
    base_dir: impl AsRef<Path>,
    parameters: impl Iterator<Item = &'a str>,
) -> Result<String, Error>
Expand description

Parses a file using the templating engine.

For an example, see parse_string.

ยงParameters

  • input_file: the file that is read
  • base_dir: all includes are resolved relative to this directory
  • parameters: if input_file contains any parameter macros, pass an iterator to them here. Otherwise pass std::iter::empty().