Struct postgres_range::Range
[−]
[src]
pub struct Range<T> { // some fields omitted }
Represents a range of values.
Methods
impl<T> Range<T> where T: PartialOrd + Normalizable
fn new(lower: Option<RangeBound<LowerBound, T>>, upper: Option<RangeBound<UpperBound, T>>) -> Range<T>
Creates a new range.
If a bound is None
, the range is unbounded in that direction.
fn empty() -> Range<T>
Creates a new empty range.
fn is_empty(&self) -> bool
Determines if this range is the empty range.
fn lower(&self) -> Option<&RangeBound<LowerBound, T>>
Returns the lower bound if it exists.
fn upper(&self) -> Option<&RangeBound<UpperBound, T>>
Returns the upper bound if it exists.
fn contains(&self, value: &T) -> bool
Determines if a value lies within this range.
fn contains_range(&self, other: &Range<T>) -> bool
Determines if a range lies completely within this range.
impl<T> Range<T> where T: PartialOrd + Normalizable + Clone
fn intersect(&self, other: &Range<T>) -> Range<T>
Returns the intersection of this range with another.
fn union(&self, other: &Range<T>) -> Option<Range<T>>
Returns the union of this range with another if it is contiguous.