[−][src]Struct pubgrub::range::Range
A Range is a set of versions.
Implementations
impl<V: Version> Range<V>
[src]
pub fn none() -> Self
[src]
Empty set of versions.
pub fn any() -> Self
[src]
Set of all possible versions.
pub fn exact(v: impl Into<V>) -> Self
[src]
Set containing exactly one version.
pub fn higher_than(v: impl Into<V>) -> Self
[src]
Set of all versions higher or equal to some version.
pub fn strictly_lower_than(v: impl Into<V>) -> Self
[src]
Set of all versions strictly lower than some version.
pub fn between(v1: impl Into<V>, v2: impl Into<V>) -> Self
[src]
Set of all versions comprised between two given versions.
The lower bound is included and the higher bound excluded.
v1 <= v < v2
.
impl<V: Version> Range<V>
[src]
pub fn negate(&self) -> Self
[src]
Compute the complement set of versions.
pub fn union(&self, other: &Self) -> Self
[src]
Compute the union of two sets of versions.
pub fn intersection(&self, other: &Self) -> Self
[src]
Compute the intersection of two sets of versions.
impl<V: Version> Range<V>
[src]
pub fn contains(&self, version: &V) -> bool
[src]
Check if a range contains a given version.
pub fn lowest_version(&self) -> Option<V>
[src]
Return the lowest version in the range (if there is one).
Trait Implementations
impl<V: Clone + Version> Clone for Range<V>
[src]
impl<V: Debug + Version> Debug for Range<V>
[src]
impl<V: Version> Display for Range<V>
[src]
impl<V: Eq + Version> Eq for Range<V>
[src]
impl<V: PartialEq + Version> PartialEq<Range<V>> for Range<V>
[src]
impl<V: Version> StructuralEq for Range<V>
[src]
impl<V: Version> StructuralPartialEq for Range<V>
[src]
Auto Trait Implementations
impl<V> RefUnwindSafe for Range<V> where
V: RefUnwindSafe,
V: RefUnwindSafe,
impl<V> Send for Range<V> where
V: Send,
V: Send,
impl<V> Sync for Range<V> where
V: Sync,
V: Sync,
impl<V> Unpin for Range<V> where
V: Unpin,
V: Unpin,
impl<V> UnwindSafe for Range<V> where
V: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,