pub enum Operator {
Less,
LessOrEqual,
Equal,
Approximate,
GreaterOrEqual,
Greater,
}Expand description
Version comparison operator for dependency atoms
Used as a prefix on versioned dependencies to constrain which versions satisfy the dependency.
See PMS 8.3.1.
Variants§
Less
< — strictly less than the specified version.
LessOrEqual
<= — less than or equal to the specified version.
Equal
= — exactly the specified version (including revision).
When used with a version ending in *, performs prefix matching
per PMS 8.3.1 (e.g., =pkg-1.2* matches 1.2.3, 1.2.4, etc.).
Approximate
~ — matches the same base version, ignoring the revision
(e.g. ~dev-lang/rust-1.75.0 matches -r0, -r1, etc.).
GreaterOrEqual
>= — greater than or equal to the specified version.
Greater
> — strictly greater than the specified version.
Trait Implementations§
impl Copy for Operator
impl Eq for Operator
impl StructuralPartialEq for Operator
Auto Trait Implementations§
impl Freeze for Operator
impl RefUnwindSafe for Operator
impl Send for Operator
impl Sync for Operator
impl Unpin for Operator
impl UnsafeUnpin for Operator
impl UnwindSafe for Operator
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