pub trait SourceProvider {
// Required method
fn get_source(&self, path: &str) -> Option<String>;
// Provided methods
fn exists(&self, path: &str) -> bool { ... }
fn list_sources(&self) -> Vec<String> { ... }
}Expand description
Provides source code content for compilation.
This trait abstracts away file system access, allowing the compiler to work with in-memory sources (useful for WASM and testing).
Required Methods§
Sourcefn get_source(&self, path: &str) -> Option<String>
fn get_source(&self, path: &str) -> Option<String>
Get the source code for a given file path
Provided Methods§
Sourcefn list_sources(&self) -> Vec<String>
fn list_sources(&self) -> Vec<String>
List available source files (for module resolution)