pub trait ModuleResolver {
// Required method
fn resolve(
&self,
module_path: &str,
context_path: Option<&Path>,
) -> Result<Option<ResolvedModuleArtifact>>;
// Provided method
fn list_modules(&self) -> Result<Vec<String>> { ... }
}Expand description
Trait implemented by all module resolvers.
Required Methods§
fn resolve( &self, module_path: &str, context_path: Option<&Path>, ) -> Result<Option<ResolvedModuleArtifact>>
Provided Methods§
fn list_modules(&self) -> Result<Vec<String>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".