pub struct Installer { /* private fields */ }Expand description
Handles transactional runtime installs.
Implementations§
Source§impl Installer
impl Installer
Sourcepub fn new(home: impl Into<PathBuf>) -> Self
pub fn new(home: impl Into<PathBuf>) -> Self
Creates a new installer rooted at the active home.
Sourcepub fn with_options(home: impl Into<PathBuf>, options: InstallerOptions) -> Self
pub fn with_options(home: impl Into<PathBuf>, options: InstallerOptions) -> Self
Creates a new installer with explicit runtime settings.
Sourcepub fn install_dir(&self, plugin: &str, version: &str) -> PathBuf
pub fn install_dir(&self, plugin: &str, version: &str) -> PathBuf
Returns the final install directory for a plugin version.
Sourcepub fn installed_versions(
&self,
plugin: &str,
) -> Result<Vec<String>, InstallerError>
pub fn installed_versions( &self, plugin: &str, ) -> Result<Vec<String>, InstallerError>
Lists installed versions for a plugin.
Sourcepub fn install(
&self,
plan: &InstallPlan,
progress: Option<&ProgressFn<'_>>,
) -> Result<InstalledRuntime, InstallerError>
pub fn install( &self, plan: &InstallPlan, progress: Option<&ProgressFn<'_>>, ) -> Result<InstalledRuntime, InstallerError>
Installs a version using a staging directory and atomic rename.
Sourcepub fn uninstall(
&self,
plugin: &str,
version: &str,
) -> Result<bool, InstallerError>
pub fn uninstall( &self, plugin: &str, version: &str, ) -> Result<bool, InstallerError>
Uninstalls a version from the local cache.
Sourcepub fn read_receipt(
&self,
plugin: &str,
version: &str,
) -> Result<Option<InstallReceipt>, InstallerError>
pub fn read_receipt( &self, plugin: &str, version: &str, ) -> Result<Option<InstallReceipt>, InstallerError>
Reads the install receipt for a version.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Installer
impl RefUnwindSafe for Installer
impl Send for Installer
impl Sync for Installer
impl Unpin for Installer
impl UnsafeUnpin for Installer
impl UnwindSafe for Installer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more