Skip to main content

FileLoader

Trait FileLoader 

Source
pub trait FileLoader: Send + Sync {
    // Required method
    fn read_file(&self, path: &Path) -> Result<String>;
}
Expand description

Reads source files; abstracted so tests can supply files from memory (rustc’s FileLoader).

Required Methods§

Source

fn read_file(&self, path: &Path) -> Result<String>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§