Crate feature_set
source ·Expand description
Tracks features provided/required by a library.
Example:
const PROVIDED: &[Action<Provide>] = &[
add_provide(("foo", 0), "2012-02-21", (1, 2, 3)),
add_provide(("foo", 1), "2012-02-22", (1, 2, 3)),
add_provide(("bar", 1), "2012-03-21", (1, 2, 4)),
del_provide(("foo", 0), "2012-04-21", (1, 2, 5)),
];
let fs = FeatureSet::from_provides(PROVIDED);
assert_eq!("bar:v1, foo:v1", fs.to_string());
Structs
- A named, versioned feature that can be provided or required.
- A collection of features, indexed by
(feature_name, feature_version)
. - A provided feature.
- A required feature with a requirement level.
Since
describes when a feature is added or removed.
Enums
- An action that adds or removes a provided/required feature.
Functions
- Create an
Add a new provided feature
action. - Create a
Remove a provided feature
action.