[][src]Struct pubgrub::range::Range

pub struct Range<V: Version> { /* fields omitted */ }

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

impl<V> Send for Range<V> where
    V: Send

impl<V> Sync for Range<V> where
    V: Sync

impl<V> Unpin for Range<V> where
    V: Unpin

impl<V> UnwindSafe for Range<V> where
    V: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.