pub enum VersionConstraint {
Exact(Version),
Caret(Version),
Tilde(Version),
GreaterOrEqual(Version),
Less(Version),
Range(Version, Version),
}Expand description
Represents a version constraint (e.g., “^1.2.3”, “~1.2.3”, “>=1.2.3”)
Variants§
Exact(Version)
Exact version match
Caret(Version)
Caret constraint: ^1.2.3 allows >=1.2.3 and <2.0.0
Tilde(Version)
Tilde constraint: ~1.2.3 allows >=1.2.3 and <1.3.0
GreaterOrEqual(Version)
Greater than or equal
Less(Version)
Less than
Range(Version, Version)
Range constraint: >=1.0.0 <2.0.0
Implementations§
Trait Implementations§
Source§impl Clone for VersionConstraint
impl Clone for VersionConstraint
Source§fn clone(&self) -> VersionConstraint
fn clone(&self) -> VersionConstraint
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 Debug for VersionConstraint
impl Debug for VersionConstraint
Source§impl PartialEq for VersionConstraint
impl PartialEq for VersionConstraint
impl Eq for VersionConstraint
impl StructuralPartialEq for VersionConstraint
Auto Trait Implementations§
impl Freeze for VersionConstraint
impl RefUnwindSafe for VersionConstraint
impl Send for VersionConstraint
impl Sync for VersionConstraint
impl Unpin for VersionConstraint
impl UnwindSafe for VersionConstraint
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.