Skip to main content

FileResolver

Trait FileResolver 

Source
pub trait FileResolver {
    // Required method
    fn resolve(&self, path: &str, relative_to: &str) -> Result<String, Error>;
}
Expand description

Trait for resolving .include file paths to their contents. Abstracted as a trait so tests can use an in-memory mock.

Required Methods§

Source

fn resolve(&self, path: &str, relative_to: &str) -> Result<String, Error>

Resolve an include path relative to the including file’s directory. Returns the file contents.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§