Struct upm_lib::PackageManager [] [src]

pub struct PackageManager {
    pub name: String,
    pub version: String,
    pub config_dir: PathBuf,
    pub install: Option<String>,
    pub install_local: Option<String>,
    pub remove: Option<String>,
    pub remove_local: Option<String>,
    pub search: Option<String>,
}

The representation of a package manager. Includes the name of the package manager, a path to reference scripts from, and commands in string form (or scripts to call package manager commands and properly format the output).

Fields

Methods

impl PackageManager
[src]

[src]

Check if the PackageManager is installed by seeing if the version command exits with a status code of 0.

[src]

Check if the specified command field of the struct is some

[src]

Attempt to run the PackageManager command specified by name. Arguments can be supplied with the args parameter.

[src]

Run the install command with the provided arguments

[src]

Run the uninstall command with the provided arguments

[src]

Run the search command with the provided arguments

[src]

Get the name of the package manager

[src]

Get the directory of the configuration file that describes the PackageManager

[src]

Run the version command

[src]

Get the Version of the package manager

[src]

Read a toml configuration file with a PackageManager description and create a PackageManager from this info.

Trait Implementations

impl Eq for PackageManager
[src]

impl Clone for PackageManager
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for PackageManager
[src]

[src]

Returns the "default value" for a type. Read more

impl PartialEq for PackageManager
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Ord for PackageManager
[src]

[src]

This method returns an Ordering between self and other. Read more

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl PartialOrd for PackageManager
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Hash for PackageManager
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more