Struct cargo_update::Options

source ·
pub struct Options {
    pub to_update: Vec<(String, Option<Semver>)>,
    pub all: bool,
    pub update: bool,
    pub install: bool,
    pub force: bool,
    pub update_git: bool,
    pub filter: Vec<PackageFilterElement>,
    pub crates_file: (String, PathBuf),
    pub cargo_dir: (String, PathBuf),
    pub temp_dir: (String, PathBuf),
}
Expand description

Representation of the application’s all configurable values.

Fields

to_update: Vec<(String, Option<Semver>)>

(Additional) packages to update. Default: []

all: bool

Whether to update all packages. Default: false

update: bool

Whether to update packages or just list them. Default: true

install: bool

Whether to allow for just installing packages. Default: false

force: bool

Update all packages. Default: false

update_git: bool

Update git packages too (it’s expensive). Default: false

filter: Vec<PackageFilterElement>

Update all packages. Default: empty

crates_file: (String, PathBuf)

The .crates.toml file in the cargo home directory. Default: in "$CARGO_INSTALL_ROOT", then "$CARGO_HOME", then "$HOME/.cargo"

cargo_dir: (String, PathBuf)

The cargo home directory. Default: "$CARGO_HOME", then "$HOME/.cargo"

temp_dir: (String, PathBuf)

The temporary directory to clone git repositories to. Default: "$TEMP/cargo-update"

Implementations

Parse env-wide command-line arguments into an Options instance

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.