pub enum Clause {
All(Vec<Requirement>),
Between(Box<Version>, Box<Version>),
Only(Requirement),
}Expand description
A single clause within a version range.
Variants§
All(Vec<Requirement>)
A list of requirements that must all match, for example >=1.2 && <2.
Between(Box<Version>, Box<Version>)
A bounded range between two fully qualified versions, inclusive
on both ends, for example 1.2.3 - 2.3.4. The versions are boxed
to keep the size of this enum down.
Only(Requirement)
A single requirement.
Implementations§
Trait Implementations§
impl Eq for Clause
Source§impl MatchesVersion for Clause
impl MatchesVersion for Clause
Source§impl Ord for Clause
impl Ord for Clause
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Clause
impl PartialOrd for Clause
impl StructuralPartialEq for Clause
Auto Trait Implementations§
impl Freeze for Clause
impl RefUnwindSafe for Clause
impl Send for Clause
impl Sync for Clause
impl Unpin for Clause
impl UnsafeUnpin for Clause
impl UnwindSafe for Clause
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more