pub struct VersionInterval {
pub lo: Option<Bound>,
pub hi: Option<Bound>,
}Expand description
A contiguous version interval. None bounds are unbounded sides.
Fields§
§lo: Option<Bound>Lower bound (None = unbounded below).
hi: Option<Bound>Upper bound (None = unbounded above).
Implementations§
Source§impl VersionInterval
impl VersionInterval
Sourcepub fn from_req(req: &VersionReq) -> Option<Self>
pub fn from_req(req: &VersionReq) -> Option<Self>
Desugar a VersionReq (conjunction of comparators) to an interval.
None when a comparator op is unsupported (future semver ops).
Sourcepub fn intersects(&self, other: &Self) -> bool
pub fn intersects(&self, other: &Self) -> bool
Whether two intervals share at least one version.
Trait Implementations§
Source§impl Clone for VersionInterval
impl Clone for VersionInterval
Source§fn clone(&self) -> VersionInterval
fn clone(&self) -> VersionInterval
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 VersionInterval
impl Debug for VersionInterval
impl Eq for VersionInterval
Source§impl PartialEq for VersionInterval
impl PartialEq for VersionInterval
Source§fn eq(&self, other: &VersionInterval) -> bool
fn eq(&self, other: &VersionInterval) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VersionInterval
Auto Trait Implementations§
impl Freeze for VersionInterval
impl RefUnwindSafe for VersionInterval
impl Send for VersionInterval
impl Sync for VersionInterval
impl Unpin for VersionInterval
impl UnsafeUnpin for VersionInterval
impl UnwindSafe for VersionInterval
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.