Skip to main content

EcosystemAdapter

Trait EcosystemAdapter 

Source
pub trait EcosystemAdapter: Send + Sync {
    // Required methods
    fn ecosystem(&self) -> EcosystemId;
    fn encode_version(&self, version: &Version) -> Result<String, AdapterError>;
    fn discover(
        &self,
        root: &Utf8Path,
    ) -> Result<Vec<PackageInspection>, AdapterError>;
    fn inspect(
        &self,
        package: &PackageLocation,
    ) -> Result<PackageInspection, AdapterError>;
    fn plan_edits(
        &self,
        input: EcosystemPlanInput<'_>,
    ) -> Result<Vec<FileEdit>, AdapterError>;
}
Expand description

Side-effect-free package discovery, inspection, and file-edit planning.

Required Methods§

Source

fn ecosystem(&self) -> EcosystemId

Source

fn encode_version(&self, version: &Version) -> Result<String, AdapterError>

Validates a planned domain version and encodes it for this ecosystem’s manifests.

Source

fn discover( &self, root: &Utf8Path, ) -> Result<Vec<PackageInspection>, AdapterError>

Source

fn inspect( &self, package: &PackageLocation, ) -> Result<PackageInspection, AdapterError>

Source

fn plan_edits( &self, input: EcosystemPlanInput<'_>, ) -> Result<Vec<FileEdit>, AdapterError>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§