Skip to main content

ImportResolver

Trait ImportResolver 

Source
pub trait ImportResolver {
    // Required method
    fn resolve(
        &self,
        import: &ValidatedImport,
    ) -> Result<ResolvedPackage, AgmError>;
}
Expand description

Trait for resolving AGM package imports to their on-disk (or registry) representations.

Required Methods§

Source

fn resolve(&self, import: &ValidatedImport) -> Result<ResolvedPackage, AgmError>

Resolve a validated import to a package.

Returns Err with I001 if the package cannot be found, or I002 if the package is found but no version satisfies the constraint.

Implementors§