Enum cargo_update::ops::PackageFilterElement [−][src]
pub enum PackageFilterElement {
Toolchain(String),
}
Expand description
One of elements with which to filter required packages.
Variants
Toolchain(String)
Requires toolchain to be specified to the specified toolchain.
Parsed name: "toolchain"
.
Tuple Fields of Toolchain
0: String
Implementations
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
Auto Trait Implementations
impl RefUnwindSafe for PackageFilterElement
impl Send for PackageFilterElement
impl Sync for PackageFilterElement
impl Unpin for PackageFilterElement
impl UnwindSafe for PackageFilterElement
Blanket Implementations
Mutably borrows from an owned value. Read more