Skip to main content

Installer

Trait Installer 

Source
pub trait Installer: Sync + Send {
    // Required methods
    fn bin_name(&self) -> &'static str;
    fn install(&self) -> Result<()>;

    // Provided methods
    fn health_check(&self) -> Option<Result<String>> { ... }
    fn run(&self) -> Result<()> { ... }
    fn health_check_args(&self) -> Option<&[&str]> { ... }
    fn should_verify_checksum(&self) -> bool { ... }
}
Expand description

Trait for installing development tools.

Required Methods§

Source

fn bin_name(&self) -> &'static str

Returns the binary name.

Source

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

Installs the tool.

Provided Methods§

Source

fn health_check(&self) -> Option<Result<String>>

Runs the installed binary to verify it is functional.

Source

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

Execute install + optional health check with timing output.

§Errors
  • Install or health check phase fails.
Source

fn health_check_args(&self) -> Option<&[&str]>

Returns arguments for the health check (e.g. --version).

Source

fn should_verify_checksum(&self) -> bool

Whether the download is checksum-verified. Defaults to true.

Override to return false for curl-based installers whose releases do not publish checksums.

Implementors§