pub enum InstallMethod {
Npm,
Pnpm,
Yarn,
Standalone,
}Expand description
Detected installation method.
Variants§
Npm
Installed via npm (npm install -g).
Pnpm
Installed via pnpm (pnpm add -g).
Yarn
Installed via yarn (yarn global add).
Standalone
Standalone binary (GitHub release, cargo install, etc.).
Implementations§
Source§impl InstallMethod
impl InstallMethod
Sourcepub fn update_command(&self) -> &'static str
pub fn update_command(&self) -> &'static str
Returns the appropriate update command as a display string.
Sourcepub fn update_command_parts(&self) -> (&'static str, &'static [&'static str])
pub fn update_command_parts(&self) -> (&'static str, &'static [&'static str])
Returns the update command as structured (program, args) for execution.
Sourcepub fn is_managed(&self) -> bool
pub fn is_managed(&self) -> bool
Returns true if this is a package-manager-managed installation.
Trait Implementations§
Source§impl Debug for InstallMethod
impl Debug for InstallMethod
Source§impl PartialEq for InstallMethod
impl PartialEq for InstallMethod
Source§fn eq(&self, other: &InstallMethod) -> bool
fn eq(&self, other: &InstallMethod) -> bool
Tests for
self and other values to be equal, and is used by ==.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 UnsafeUnpin 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