Function recital::resolve::resolve
[−]
[src]
pub fn resolve(
versions: &Vec<Version>,
constraints: &Constraints
) -> Vec<Version>
Resolves a set of constraints against a pool of version numbers.
This function will return a copy all of the version numbers that satisfy the given set of constraints.
use recital::resolve::Constraints::And; use recital::resolve::Operation::*; use recital::resolve::resolve; let constraints = constraints!(And, GreaterThan(version!(1, 0, 1)), LessThan(version!(2, 0, 0))); let pool = vec![version!(1, 0, 0), version!(1, 0, 1), version!(1, 0, 2), version!(1, 1, 0), version!(1, 1, 1), version!(1, 1, 2), version!(2, 0, 0)]; let versions = resolve(&pool, &constraints);