Enum cargo_update::ops::PackageFilterElement[][src]

pub enum PackageFilterElement {
    Toolchain(String),
}

One of elements with which to filter required packages.

Variants

Requires toolchain to be specified to the specified toolchain.

Parsed name: "toolchain".

Methods

impl PackageFilterElement
[src]

Parse one filter specifier into up to one package filter

Examples

assert_eq!(PackageFilterElement::parse("toolchain=nightly"),
           Ok(PackageFilterElement::Toolchain("nightly".to_string())));

assert!(PackageFilterElement::parse("capitalism").is_err());
assert!(PackageFilterElement::parse("communism=good").is_err());

Check if the specified package config matches this filter element.

Examples

assert!(PackageFilterElement::Toolchain("nightly".to_string())
    .matches(&PackageConfig::from(&[ConfigOperation::SetToolchain("nightly".to_string())])));

assert!(!PackageFilterElement::Toolchain("nightly".to_string()).matches(&PackageConfig::from(&[])));

Trait Implementations

impl Debug for PackageFilterElement
[src]

Formats the value using the given formatter. Read more

impl Clone for PackageFilterElement
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Hash for PackageFilterElement
[src]

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

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

impl PartialEq for PackageFilterElement
[src]

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

This method tests for !=.

impl Eq for PackageFilterElement
[src]

impl PartialOrd for PackageFilterElement
[src]

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

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

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

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

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

impl Ord for PackageFilterElement
[src]

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

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Auto Trait Implementations