pub trait FileResolver {
// Required methods
fn resolve(
&self,
spec: &ImportSpec<'_>,
importer: Option<&ModuleId>,
) -> Result<ModuleId, String>;
fn load(&self, id: &ModuleId) -> Result<String, String>;
}Required Methods§
Sourcefn resolve(
&self,
spec: &ImportSpec<'_>,
importer: Option<&ModuleId>,
) -> Result<ModuleId, String>
fn resolve( &self, spec: &ImportSpec<'_>, importer: Option<&ModuleId>, ) -> Result<ModuleId, String>
Canonicalizes the specifier relative to the importing module.
fn load(&self, id: &ModuleId) -> Result<String, String>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".