[−][src]Struct shardio::range::Range
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>
end: Option<K>
Methods
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
pub fn cmp(&self, point: &K) -> Rorder
[src]
Trait Implementations
impl<K: PartialEq> PartialEq<Range<K>> for Range<K>
[src]
impl<K: Clone> Clone for Range<K>
[src]
fn clone(&self) -> Range<K>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<K: Ord> Ord for Range<K>
[src]
fn cmp(&self, other: &Range<K>) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl<K: Eq> Eq for Range<K>
[src]
impl<K: PartialOrd> PartialOrd<Range<K>> for Range<K>
[src]
fn partial_cmp(&self, other: &Range<K>) -> Option<Ordering>
[src]
fn lt(&self, other: &Range<K>) -> bool
[src]
fn le(&self, other: &Range<K>) -> bool
[src]
fn gt(&self, other: &Range<K>) -> bool
[src]
fn ge(&self, other: &Range<K>) -> bool
[src]
impl<K: Copy> Copy for Range<K>
[src]
impl<K: Debug> Debug for Range<K>
[src]
impl<K> Serialize for Range<K> where
K: Serialize,
[src]
K: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de, K> Deserialize<'de> for Range<K> where
K: Deserialize<'de>,
[src]
K: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,