Struct shardio::range::Range[][src]

pub struct Range<K> {
    pub start: Option<K>,
    pub end: Option<K>,
}

A range of points over the type K, spanning the half-open interval [start, end). A value of None indicates that the interval is unbounded in that direction.

Fields

start: Option<K>

Start of interval

end: Option<K>

Inclusive end of interval

Implementations

impl<K: Ord + Clone> Range<K>[src]

pub fn new(start: K, end: K) -> Range<K>[src]

Create a Range object spanning the half-open interval [start, `end)

pub fn starts_at(start: K) -> Range<K>[src]

Create a range containing all points greater than or equal to start

pub fn ends_at(end: K) -> Range<K>[src]

Create a range containing all points less than end

pub fn all() -> Range<K>[src]

Create a range covering all points.

pub fn contains(&self, point: &K) -> bool[src]

Test if point in contained in the range self

pub fn intersects(&self, other: &Range<K>) -> bool[src]

Test if Range other intersects Range self

Trait Implementations

impl<K: Clone> Clone for Range<K>[src]

impl<K: Copy> Copy for Range<K>[src]

impl<K: Debug> Debug for Range<K>[src]

impl<'de, K> Deserialize<'de> for Range<K> where
    K: Deserialize<'de>, 
[src]

impl<K: Eq> Eq for Range<K>[src]

impl<K: Ord> Ord for Range<K>[src]

impl<K: PartialEq> PartialEq<Range<K>> for Range<K>[src]

impl<K: PartialOrd> PartialOrd<Range<K>> for Range<K>[src]

impl<K> Serialize for Range<K> where
    K: Serialize
[src]

impl<K> StructuralEq for Range<K>[src]

impl<K> StructuralPartialEq for Range<K>[src]

Auto Trait Implementations

impl<K> RefUnwindSafe for Range<K> where
    K: RefUnwindSafe

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

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

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

impl<K> UnwindSafe for Range<K> where
    K: 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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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, 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.