Struct cargo_update::Options

source ·
pub struct Options {
Show 13 fields pub to_update: Vec<(String, Option<Semver>, String)>, pub all: bool, pub update: bool, pub install: bool, pub force: bool, pub downdate: bool, pub update_git: bool, pub quiet: bool, pub filter: Vec<PackageFilterElement>, pub cargo_dir: PathBuf, pub temp_dir: PathBuf, pub cargo_install_args: Vec<OsString>, pub install_cargo: Option<OsString>,
}
Expand description

Representation of the application’s all configurable values.

Fields§

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

(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

§downdate: bool

Downdate packages to match newest unyanked registry version.

§update_git: bool

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

§quiet: bool

Don’t output messages and pass –quiet to cargo subprocesses. Default: false

§filter: Vec<PackageFilterElement>

Update all packages. Default: empty

§cargo_dir: PathBuf

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

§temp_dir: PathBuf

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

§cargo_install_args: Vec<OsString>

Arbitrary arguments to forward to cargo install, acquired from $CARGO_INSTALL_OPTS. Default: []

§install_cargo: Option<OsString>

The cargo to run for installations. Default: None (use “cargo”)

Implementations§

source§

impl Options

source

pub fn parse() -> Options

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

Trait Implementations§

source§

impl Clone for Options

source§

fn clone(&self) -> Options

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Options

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for Options

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<Options> for Options

source§

fn eq(&self, other: &Options) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for Options

source§

impl StructuralEq for Options

source§

impl StructuralPartialEq for Options

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.