pub trait Adapter: Send + Sync {
// Required methods
fn execute(
&self,
component_id: &str,
version: &str,
) -> Result<AdapterOutput, AdapterError>;
fn executor_kind(&self) -> ExecutorKind;
}Expand description
Trait for component adapters.
Each adapter knows how to execute a specific component’s installation. Implementations may use Rust-native logic or delegate to shell scripts.
Required Methods§
Sourcefn execute(
&self,
component_id: &str,
version: &str,
) -> Result<AdapterOutput, AdapterError>
fn execute( &self, component_id: &str, version: &str, ) -> Result<AdapterOutput, AdapterError>
Execute the adapter for the given component.
Returns the output on success, or an error on failure.
Sourcefn executor_kind(&self) -> ExecutorKind
fn executor_kind(&self) -> ExecutorKind
The kind of executor this adapter uses.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".