pub trait Loader {
// Required method
fn load(&self, path: &Path) -> Result<String, LoadError>;
}Expand description
A pluggable source-text loader.
Implementations decide where bytes come from (filesystem, in-memory map,
virtual filesystem, content-addressed store, …). lex-core never references
std::fs directly through this trait; that keeps the resolver pure and
usable in WASM, sandboxes, and unit tests.