pub enum InstallMethod {
Homebrew,
CargoRegistry,
CargoPath(PathBuf),
Standalone,
}Expand description
How mi6 was installed
Variants§
Homebrew
Installed via Homebrew
CargoRegistry
Installed via cargo install mi6 (from crates.io registry)
CargoPath(PathBuf)
Installed via cargo install --path <path> (from local source)
Standalone
Standalone binary (e.g., downloaded from GitHub releases or install.sh)
Implementations§
Source§impl InstallMethod
impl InstallMethod
Sourcepub fn detect() -> Result<Self>
pub fn detect() -> Result<Self>
Detect the installation method based on the executable path and cargo metadata
Sourcepub fn to_upgrade_method(&self) -> UpgradeMethod
pub fn to_upgrade_method(&self) -> UpgradeMethod
Convert to UpgradeMethod (for comparison purposes)
Sourcepub fn from_upgrade_method(
method: UpgradeMethod,
path: Option<PathBuf>,
) -> Result<Self>
pub fn from_upgrade_method( method: UpgradeMethod, path: Option<PathBuf>, ) -> Result<Self>
Create from UpgradeMethod with optional path for CargoSource
Sourcepub fn check_prerequisites(&self) -> Result<()>
pub fn check_prerequisites(&self) -> Result<()>
Check if prerequisites for this installation method are met
Trait Implementations§
Source§impl Clone for InstallMethod
impl Clone for InstallMethod
Source§fn clone(&self) -> InstallMethod
fn clone(&self) -> InstallMethod
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InstallMethod
impl Debug for InstallMethod
Source§impl PartialEq for InstallMethod
impl PartialEq for InstallMethod
impl Eq for InstallMethod
impl StructuralPartialEq for InstallMethod
Auto Trait Implementations§
impl Freeze for InstallMethod
impl RefUnwindSafe for InstallMethod
impl Send for InstallMethod
impl Sync for InstallMethod
impl Unpin for InstallMethod
impl UnwindSafe for InstallMethod
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