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§
Sourcefn install(
&self,
source: &str,
name: Option<String>,
) -> Result<InstalledPlugin, PluginError>
fn install( &self, source: &str, name: Option<String>, ) -> Result<InstalledPlugin, PluginError>
Install a plugin from source with the given name.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".