pub trait Adapter {
// Required methods
fn name(&self) -> ToolName;
fn desired_version(&self) -> String;
fn install(&self) -> Result<()>;
fn version(&self) -> Result<String>;
fn verify(&self) -> Result<()>;
// Provided methods
fn package_adapter(&self) -> Result<Option<Box<dyn Adapter>>> { ... }
fn is_current(&self, installed: &str) -> bool { ... }
}Required Methods§
fn name(&self) -> ToolName
Sourcefn desired_version(&self) -> String
fn desired_version(&self) -> String
Release identity reviewed and pinned by this Tambo build.
fn install(&self) -> Result<()>
fn version(&self) -> Result<String>
fn verify(&self) -> Result<()>
Provided Methods§
Sourcefn package_adapter(&self) -> Result<Option<Box<dyn Adapter>>>
fn package_adapter(&self) -> Result<Option<Box<dyn Adapter>>>
Bind package verification to the executables PATH actually runs. Most adapters already use PATH; Quipu and manifest members normally prefer their managed Cargo install.
fn is_current(&self, installed: &str) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".