pub enum VersionReq {
Compatible {
major: u64,
minor: u64,
patch: u64,
},
Approx {
major: u64,
minor: u64,
patch: u64,
},
Gte {
major: u64,
minor: u64,
patch: u64,
},
Lte {
major: u64,
minor: u64,
patch: u64,
},
Gt {
major: u64,
minor: u64,
patch: u64,
},
Lt {
major: u64,
minor: u64,
patch: u64,
},
Exact {
major: u64,
minor: u64,
patch: u64,
},
}Expand description
A version constraint with an operator and target version.
Variants§
Compatible
^major.minor.patch — compatible: >= target and < next-major.
Approx
~major.minor.patch — approximately: >= target and < next-minor.
Gte
>=major.minor.patch
Lte
<=major.minor.patch
Gt
>major.minor.patch
Lt
<major.minor.patch
Exact
major.minor.patch — exact match.
Trait Implementations§
Source§impl Clone for VersionReq
impl Clone for VersionReq
Source§fn clone(&self) -> VersionReq
fn clone(&self) -> VersionReq
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VersionReq
impl Debug for VersionReq
Source§impl Display for VersionReq
impl Display for VersionReq
Source§impl PartialEq for VersionReq
impl PartialEq for VersionReq
Source§fn eq(&self, other: &VersionReq) -> bool
fn eq(&self, other: &VersionReq) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VersionReq
Auto Trait Implementations§
impl Freeze for VersionReq
impl RefUnwindSafe for VersionReq
impl Send for VersionReq
impl Sync for VersionReq
impl Unpin for VersionReq
impl UnsafeUnpin for VersionReq
impl UnwindSafe for VersionReq
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