pub enum Term<VS: VersionSet> {
Positive(VS),
Negative(VS),
}Expand description
A positive or negative expression regarding a set of versions.
Positive(r) and Negative(r.complement()) are not equivalent:
- the term
Positive(r)is satisfied if the package is selected AND the selected version is inr. - the term
Negative(r.complement())is satisfied if the package is not selected OR the selected version is inr.
A Positive term in the partial solution requires a version to be selected, but a Negative term
allows for a solution that does not have that package selected.
Specifically, Positive(VS::empty()) means that there was a conflict (we need to select a version for the package
but can’t pick any), while Negative(VS::full()) would mean it is fine as long as we don’t select the package.
Variants§
Positive(VS)
For example, 1.0.0 <= v < 2.0.0 is a positive expression
that is evaluated true if a version is selected
and comprised between version 1.0.0 and version 2.0.0.
Negative(VS)
The term not (v < 3.0.0) is a negative expression
that is evaluated true if a version >= 3.0.0 is selected
or if no version is selected at all.
Trait Implementations§
impl<VS: Eq + VersionSet> Eq for Term<VS>
impl<VS: VersionSet> StructuralPartialEq for Term<VS>
Auto Trait Implementations§
impl<VS> Freeze for Term<VS>where
VS: Freeze,
impl<VS> RefUnwindSafe for Term<VS>where
VS: RefUnwindSafe,
impl<VS> Send for Term<VS>where
VS: Send,
impl<VS> Sync for Term<VS>where
VS: Sync,
impl<VS> Unpin for Term<VS>where
VS: Unpin,
impl<VS> UnwindSafe for Term<VS>where
VS: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.