pub struct PathManager;Expand description
Path-based package detection (checks if binary exists on PATH)
Implementations§
Source§impl PathManager
impl PathManager
pub fn new() -> Self
Sourcepub async fn which(&self, binary: &str) -> Result<Option<String>>
pub async fn which(&self, binary: &str) -> Result<Option<String>>
Check if a binary exists on PATH and return its location
Trait Implementations§
Source§impl PackageManager for PathManager
impl PackageManager for PathManager
Source§fn manager_type(&self) -> PackageManagerType
fn manager_type(&self) -> PackageManagerType
Get the type of this package manager
Source§fn is_available<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_available<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check if the package manager is available on the system
Source§fn check_installed<'life0, 'life1, 'async_trait>(
&'life0 self,
package: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_installed<'life0, 'life1, 'async_trait>(
&'life0 self,
package: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if a package is installed
Source§fn install<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_package: &'life1 str,
_args: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn install<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_package: &'life1 str,
_args: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Install a package with optional arguments
Auto Trait Implementations§
impl Freeze for PathManager
impl RefUnwindSafe for PathManager
impl Send for PathManager
impl Sync for PathManager
impl Unpin for PathManager
impl UnsafeUnpin for PathManager
impl UnwindSafe for PathManager
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