preprocess

Function preprocess 

Source
pub fn preprocess<P, S>(
    entry_point: P,
    search_paths: SearchPaths,
    output_sink: S,
) -> Result<S, Error>
where P: AsRef<Path>, S: OutputSink,
Expand description

Processes the entry_point file, potentially inlining files referenced by #include directives.

Outputs string chunks to the given output_sink which, when concatenated in order, represent the intended result string.

For details on directive processing and inlining, refer to the top-level documentation.

Returns an error when:

  • An invalid directive is encountered.
  • A path referenced by an #include directive fails to resolve to a valid file.
  • An error occurred while interacting with the underlying OS.