Skip to main content

Installer

Trait Installer 

Source
pub trait Installer {
    // Required methods
    fn id(&self) -> ClientId;
    fn detect(&self) -> Result<bool>;
    fn install(&self, ctx: &InstallContext) -> Result<InstallReport>;
    fn update(&self, ctx: &InstallContext) -> Result<UpdateReport>;
    fn uninstall(&self, ctx: &InstallContext) -> Result<UninstallReport>;
    fn diagnose(&self, ctx: &InstallContext) -> Result<DiagnosticReport>;
}
Expand description

Single per-client installer surface.

All methods MUST be safe to call multiple times. install and uninstall are responsible for backing up any file they touch.

Required Methods§

Source

fn id(&self) -> ClientId

Stable identifier matching ClientId::as_str().

Source

fn detect(&self) -> Result<bool>

Returns true when the local environment looks like the client is installed (e.g. ~/.claude/ exists). Used to power doctor.

Source

fn install(&self, ctx: &InstallContext) -> Result<InstallReport>

Source

fn update(&self, ctx: &InstallContext) -> Result<UpdateReport>

Source

fn uninstall(&self, ctx: &InstallContext) -> Result<UninstallReport>

Source

fn diagnose(&self, ctx: &InstallContext) -> Result<DiagnosticReport>

Implementors§