#[non_exhaustive]pub enum VersionReqVariant {
Show 14 variants
Strict(Version),
Compound(VersionReqVariantLowerBound, VersionReqVariantUpperBound),
MajorGreater {
major: u64,
},
MinorGreater {
major: u64,
minor: u64,
},
PatchGreater {
major: u64,
minor: u64,
patch: u64,
},
MajorGreaterEqual {
major: u64,
},
MinorGreaterEqual {
major: u64,
minor: u64,
},
PatchGreaterEqual {
major: u64,
minor: u64,
patch: u64,
},
MajorLess {
major: u64,
},
MinorLess {
major: u64,
minor: u64,
},
PatchLess {
major: u64,
minor: u64,
patch: u64,
},
MajorLessEqual {
major: u64,
},
MinorLessEqual {
major: u64,
minor: u64,
},
PatchLessEqual {
major: u64,
minor: u64,
patch: u64,
},
}
Expand description
The variants in which a version requirenment can be constructed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Strict(Version)
Equivalent of “1.2.3” where 1.2.3
is the only version this requirenment will match to.
Compound(VersionReqVariantLowerBound, VersionReqVariantUpperBound)
Composition of an lower and an upper bound.
MajorGreater
Equivalent of “>1”
MinorGreater
Equivalent of “>1.2”
PatchGreater
Equivalent of “>1.2.3”
MajorGreaterEqual
Equivalent of “>=1”
MinorGreaterEqual
Equivalent of “>=1.2”
PatchGreaterEqual
Equivalent of “>=1.2.3”
MajorLess
Equivalent of “<1”
MinorLess
Equivalent of “<1.2”
PatchLess
Equivalent of “<1.2.3”
MajorLessEqual
Equivalent of “<=1”
MinorLessEqual
Equivalent of “<=1.2”
PatchLessEqual
Equivalent of “<=1.2.3”
Trait Implementations§
Source§impl Clone for VersionReqVariant
impl Clone for VersionReqVariant
Source§fn clone(&self) -> VersionReqVariant
fn clone(&self) -> VersionReqVariant
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Hash for VersionReqVariant
impl Hash for VersionReqVariant
Source§impl Ord for VersionReqVariant
impl Ord for VersionReqVariant
Source§fn cmp(&self, other: &VersionReqVariant) -> Ordering
fn cmp(&self, other: &VersionReqVariant) -> Ordering
1.21.0 · 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 PartialEq for VersionReqVariant
impl PartialEq for VersionReqVariant
Source§impl PartialOrd for VersionReqVariant
impl PartialOrd for VersionReqVariant
impl Copy for VersionReqVariant
impl Eq for VersionReqVariant
impl StructuralPartialEq for VersionReqVariant
Auto Trait Implementations§
impl Freeze for VersionReqVariant
impl RefUnwindSafe for VersionReqVariant
impl Send for VersionReqVariant
impl Sync for VersionReqVariant
impl Unpin for VersionReqVariant
impl UnwindSafe for VersionReqVariant
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