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§
fn ecosystem(&self) -> EcosystemId
Sourcefn encode_version(&self, version: &Version) -> Result<String, AdapterError>
fn encode_version(&self, version: &Version) -> Result<String, AdapterError>
Validates a planned domain version and encodes it for this ecosystem’s manifests.
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>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".