Skip to main content

PluginInstaller

Trait PluginInstaller 

Source
pub trait PluginInstaller {
    // Required methods
    fn install(
        &self,
        source: &str,
        name: Option<String>,
    ) -> Result<InstalledPlugin, PluginError>;
    fn remove(&self, name: &str) -> Result<(), PluginError>;
}
Expand description

Abstraction for installing and removing plugins.

This isolates installation mechanics (git clone, local copy, etc.) from the CLI layer, enabling test doubles and alternate install targets.

Required Methods§

Source

fn install( &self, source: &str, name: Option<String>, ) -> Result<InstalledPlugin, PluginError>

Install a plugin from source with the given name.

Source

fn remove(&self, name: &str) -> Result<(), PluginError>

Remove an installed plugin by name.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§