Skip to main content

Options

Struct Options 

Source
pub struct Options {
Show 18 fields pub to_update: Vec<(String, Option<Version>, Cow<'static, str>)>, pub all: bool, pub update: bool, pub install: bool, pub force: bool, pub downdate: bool, pub update_git: bool, pub quiet: bool, pub locked: bool, pub released_after: Option<DateTime<Utc>>, pub filter: Vec<PackageFilterElement>, pub cargo_dir: (PathBuf, PathBuf), pub temp_dir: PathBuf, pub cargo_install_args: Vec<OsString>, pub install_cargo: Option<OsString>, pub jobs: Option<NonZero<usize>>, pub recursive_jobs: Option<NonZero<usize>>, pub concurrent_cargos: Option<NonZero<usize>>,
}
Expand description

Representation of the application’s all configurable values.

Fields§

§to_update: Vec<(String, Option<Version>, Cow<'static, str>)>

(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

§locked: bool

Enforce packages’ embedded Cargo.lock. Exactly like CARGO_INSTALL_OPTS=--locked (or --enforce-lock per package) except doesn’t disable cargo-binstall. Default: false

§released_after: Option<DateTime<Utc>>

Only install versions released after this time. Default: None

§filter: Vec<PackageFilterElement>

Update all packages. Default: empty

§cargo_dir: (PathBuf, PathBuf)

The cargo home directory; (original, canonicalised). 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”)

§jobs: Option<NonZero<usize>>

cargo install -j argument. Default: None

§recursive_jobs: Option<NonZero<usize>>

Start jobserver to fill this many CPUs. Default: None

§concurrent_cargos: Option<NonZero<usize>>

Additional limit of concurrent cargo installs. Default: None

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 duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Eq for Options

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 for Options

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Options

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

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

Source§

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

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where 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> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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 T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.