pub trait Resolve: Send + Sync {
// Required methods
fn resolve(&self, from_file: &str, import: &RawImport) -> ResolutionOutcome;
fn clear_cache(&self);
// Provided method
fn baseline_completeness(&self) -> ResolutionCompleteness { ... }
}Expand description
A type-erased module resolver.
Required Methods§
Sourcefn resolve(&self, from_file: &str, import: &RawImport) -> ResolutionOutcome
fn resolve(&self, from_file: &str, import: &RawImport) -> ResolutionOutcome
Resolve an import relative to its importing file.
from_file must be an absolute path. Relative inputs return
UnresolvedReason::Failed.
Sourcefn clear_cache(&self)
fn clear_cache(&self)
Discard all cached filesystem and configuration state.
This call must not overlap an in-flight Self::resolve, as required by
oxc_resolver. The Hearth adapter guarantees exclusion through
single-flight sweeps.
Provided Methods§
Sourcefn baseline_completeness(&self) -> ResolutionCompleteness
fn baseline_completeness(&self) -> ResolutionCompleteness
Baseline completeness for files handled by this resolver.
This applies even when import extraction yields no imports, so a best-effort resolver cannot become exact through an empty fold.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".