pub struct YarnPackageManager;Expand description
Yarn package manager implementation
Trait Implementations§
Source§impl Default for YarnPackageManager
impl Default for YarnPackageManager
Source§fn default() -> YarnPackageManager
fn default() -> YarnPackageManager
Returns the “default value” for a type. Read more
Source§impl VxPackageManager for YarnPackageManager
impl VxPackageManager for YarnPackageManager
Source§fn is_preferred_for_project(&self, project_path: &Path) -> bool
fn is_preferred_for_project(&self, project_path: &Path) -> bool
Detect if this is a yarn project by looking for yarn.lock
Source§fn ecosystem(&self) -> Ecosystem
fn ecosystem(&self) -> Ecosystem
Ecosystem this package manager belongs to (required) Read more
Source§fn description(&self) -> &str
fn description(&self) -> &str
Description of the package manager (optional) Read more
Source§fn get_config_files(&self) -> Vec<&str>
fn get_config_files(&self) -> Vec<&str>
Get configuration files that indicate this package manager should be used Read more
Source§fn install_packages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
packages: &'life1 [PackageSpec],
project_path: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn install_packages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
packages: &'life1 [PackageSpec],
project_path: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Install packages (main method to implement) Read more
Source§fn remove_packages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
packages: &'life1 [String],
project_path: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn remove_packages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
packages: &'life1 [String],
project_path: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Remove packages Read more
Source§fn update_packages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
packages: &'life1 [String],
project_path: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_packages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
packages: &'life1 [String],
project_path: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Update packages Read more
Source§fn is_available<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn is_available<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Check if this package manager is available on the system Read more
Source§fn list_packages<'life0, 'life1, 'async_trait>(
&'life0 self,
project_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<PackageInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn list_packages<'life0, 'life1, 'async_trait>(
&'life0 self,
project_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<PackageInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
List installed packages Read more
Source§fn search_packages<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<PackageInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn search_packages<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<PackageInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Search for packages Read more
Source§fn run_command<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
command: &'life1 [&'life2 str],
args: &'life3 [String],
project_path: &'life4 Path,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn run_command<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
command: &'life1 [&'life2 str],
args: &'life3 [String],
project_path: &'life4 Path,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Run a package manager command with arguments Read more
Source§fn default_list_packages<'life0, 'life1, 'async_trait>(
&'life0 self,
_project_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<PackageInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn default_list_packages<'life0, 'life1, 'async_trait>(
&'life0 self,
_project_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<PackageInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Default implementation for listing packages Read more
Source§fn run_search_command<'life0, 'life1, 'async_trait>(
&'life0 self,
_query: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<PackageInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn run_search_command<'life0, 'life1, 'async_trait>(
&'life0 self,
_query: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<PackageInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Default implementation for searching packages Read more
Source§fn get_config(&self) -> PackageManagerConfig
fn get_config(&self) -> PackageManagerConfig
Get package manager configuration Read more
Source§fn run_command_with_code<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
command: &'life1 [&'life2 str],
args: &'life3 [String],
project_path: &'life4 Path,
) -> Pin<Box<dyn Future<Output = Result<i32, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn run_command_with_code<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
command: &'life1 [&'life2 str],
args: &'life3 [String],
project_path: &'life4 Path,
) -> Pin<Box<dyn Future<Output = Result<i32, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Run a package manager command and return the exit code Read more
Auto Trait Implementations§
impl Freeze for YarnPackageManager
impl RefUnwindSafe for YarnPackageManager
impl Send for YarnPackageManager
impl Sync for YarnPackageManager
impl Unpin for YarnPackageManager
impl UnsafeUnpin for YarnPackageManager
impl UnwindSafe for YarnPackageManager
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