Skip to main content

Adapter

Trait Adapter 

Source
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§

Source

fn name(&self) -> ToolName

Source

fn desired_version(&self) -> String

Release identity reviewed and pinned by this Tambo build.

Source

fn install(&self) -> Result<()>

Source

fn version(&self) -> Result<String>

Source

fn verify(&self) -> Result<()>

Provided Methods§

Source

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.

Source

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".

Implementors§