pub enum VersionReq {
Exact(Version),
Greater(Version),
GreaterEq(Version),
Less(Version),
LessEq(Version),
Tilde(Version),
Caret(Version),
Wildcard(u64, Option<u64>),
Range(Box<VersionReq>, Box<VersionReq>),
Any,
}Expand description
A version requirement (constraint).
Variants§
Exact(Version)
Exact version match.
Greater(Version)
Greater than.
GreaterEq(Version)
Greater than or equal.
Less(Version)
Less than.
LessEq(Version)
Less than or equal.
Tilde(Version)
Tilde requirement (~1.2.3 means >=1.2.3 and <1.3.0).
Caret(Version)
Caret requirement (^1.2.3 means >=1.2.3 and <2.0.0).
Wildcard(u64, Option<u64>)
Wildcard (1.2.* means >=1.2.0 and <1.3.0).
Range(Box<VersionReq>, Box<VersionReq>)
Range (>=1.0.0, <2.0.0).
Any
Any version.
Implementations§
Source§impl VersionReq
impl VersionReq
Trait Implementations§
Source§impl Clone for VersionReq
impl Clone for VersionReq
Source§impl Debug for VersionReq
impl Debug for VersionReq
Source§impl Default for VersionReq
impl Default for VersionReq
Source§impl Display for VersionReq
impl Display for VersionReq
impl Eq for VersionReq
Source§impl FromStr for VersionReq
impl FromStr for VersionReq
Source§impl PartialEq for VersionReq
impl PartialEq for VersionReq
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
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
Compare self to
key and return true if they are equal.