pub struct UpperBoundedSet<T> { /* private fields */ }Expand description
A set of ranges with a finite upper bound but no lower bound.
While an UpperBoundedSet can be constructed directly, it will most likely arise as a
result of one or more range operations.
use rangetools::{UpperBoundedSet, Rangetools};
let s: UpperBoundedSet<_> = (10..20).union(..5);Implementations§
Trait Implementations§
Source§impl<T: Clone> Clone for UpperBoundedSet<T>
impl<T: Clone> Clone for UpperBoundedSet<T>
Source§impl<T: Debug> Debug for UpperBoundedSet<T>
impl<T: Debug> Debug for UpperBoundedSet<T>
impl<T: Eq> Eq for UpperBoundedSet<T>
Source§impl<T> From<UpperBoundedRange<T>> for UpperBoundedSet<T>
impl<T> From<UpperBoundedRange<T>> for UpperBoundedSet<T>
Source§fn from(upper_bounded_range: UpperBoundedRange<T>) -> Self
fn from(upper_bounded_range: UpperBoundedRange<T>) -> Self
Converts to this type from the input type.
Source§impl<T: Hash> Hash for UpperBoundedSet<T>
impl<T: Hash> Hash for UpperBoundedSet<T>
Source§impl<T: PartialEq> PartialEq for UpperBoundedSet<T>
impl<T: PartialEq> PartialEq for UpperBoundedSet<T>
Source§impl<T> RangeComplement<LowerBoundedSet<T>> for UpperBoundedSet<T>
impl<T> RangeComplement<LowerBoundedSet<T>> for UpperBoundedSet<T>
Source§fn complement(self) -> LowerBoundedSet<T>
fn complement(self) -> LowerBoundedSet<T>
Returns a set of all the elements not in
self.Source§impl<T> RangeComplement<UpperBoundedSet<T>> for LowerBoundedSet<T>
impl<T> RangeComplement<UpperBoundedSet<T>> for LowerBoundedSet<T>
Source§fn complement(self) -> UpperBoundedSet<T>
fn complement(self) -> UpperBoundedSet<T>
Returns a set of all the elements not in
self.Source§impl<T, R> RangeIntersection<R, BoundedRange<T>> for UpperBoundedSet<T>
impl<T, R> RangeIntersection<R, BoundedRange<T>> for UpperBoundedSet<T>
Source§type Output = BoundedSet<T>
type Output = BoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, BoundedSet<T>> for UpperBoundedSet<T>
impl<T, R> RangeIntersection<R, BoundedSet<T>> for UpperBoundedSet<T>
Source§type Output = BoundedSet<T>
type Output = BoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, EmptyRange<T>> for UpperBoundedSet<T>
impl<T, R> RangeIntersection<R, EmptyRange<T>> for UpperBoundedSet<T>
Source§type Output = EmptyRange<T>
type Output = EmptyRange<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, LowerBoundedRange<T>> for UpperBoundedSet<T>
impl<T, R> RangeIntersection<R, LowerBoundedRange<T>> for UpperBoundedSet<T>
Source§type Output = BoundedSet<T>
type Output = BoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, LowerBoundedSet<T>> for UpperBoundedSet<T>
impl<T, R> RangeIntersection<R, LowerBoundedSet<T>> for UpperBoundedSet<T>
Source§type Output = BoundedSet<T>
type Output = BoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, UnboundedRange> for UpperBoundedSet<T>where
R: Rangetools<Inner = UnboundedRange>,
impl<T, R> RangeIntersection<R, UnboundedRange> for UpperBoundedSet<T>where
R: Rangetools<Inner = UnboundedRange>,
Source§type Output = UpperBoundedSet<T>
type Output = UpperBoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, _: R) -> Self::Output
fn intersection(self, _: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, UnboundedSet<T>> for UpperBoundedSet<T>
impl<T, R> RangeIntersection<R, UnboundedSet<T>> for UpperBoundedSet<T>
Source§type Output = UpperBoundedSet<T>
type Output = UpperBoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, UpperBoundedRange<T>> for UpperBoundedSet<T>
impl<T, R> RangeIntersection<R, UpperBoundedRange<T>> for UpperBoundedSet<T>
Source§type Output = UpperBoundedSet<T>
type Output = UpperBoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for Range<T>
impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for Range<T>
Source§type Output = BoundedSet<T>
type Output = BoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for RangeFrom<T>
impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for RangeFrom<T>
Source§type Output = BoundedSet<T>
type Output = BoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for RangeFullwhere
R: Rangetools<Inner = UpperBoundedSet<T>>,
impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for RangeFullwhere
R: Rangetools<Inner = UpperBoundedSet<T>>,
Source§type Output = UpperBoundedSet<T>
type Output = UpperBoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for RangeInclusive<T>
impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for RangeInclusive<T>
Source§type Output = BoundedSet<T>
type Output = BoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for RangeTo<T>
impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for RangeTo<T>
Source§type Output = UpperBoundedSet<T>
type Output = UpperBoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for RangeToInclusive<T>
impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for RangeToInclusive<T>
Source§type Output = UpperBoundedSet<T>
type Output = UpperBoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for BoundedRange<T>
impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for BoundedRange<T>
Source§type Output = BoundedSet<T>
type Output = BoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for LowerBoundedRange<T>
impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for LowerBoundedRange<T>
Source§type Output = BoundedSet<T>
type Output = BoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for UpperBoundedRange<T>
impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for UpperBoundedRange<T>
Source§type Output = UpperBoundedSet<T>
type Output = UpperBoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for BoundedSet<T>
impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for BoundedSet<T>
Source§type Output = BoundedSet<T>
type Output = BoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for LowerBoundedSet<T>
impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for LowerBoundedSet<T>
Source§type Output = BoundedSet<T>
type Output = BoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for UnboundedSet<T>
impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for UnboundedSet<T>
Source§type Output = UpperBoundedSet<T>
type Output = UpperBoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for UpperBoundedSet<T>
impl<T, R> RangeIntersection<R, UpperBoundedSet<T>> for UpperBoundedSet<T>
Source§type Output = UpperBoundedSet<T>
type Output = UpperBoundedSet<T>
The output type of the intersection.
Source§fn intersection(self, other: R) -> Self::Output
fn intersection(self, other: R) -> Self::Output
Returns the set intersection of
self and other.Source§impl<T, R> RangeUnion<R, BoundedSet<T>> for UpperBoundedSet<T>
impl<T, R> RangeUnion<R, BoundedSet<T>> for UpperBoundedSet<T>
Source§impl<T, R> RangeUnion<R, EmptyRange<T>> for UpperBoundedSet<T>
impl<T, R> RangeUnion<R, EmptyRange<T>> for UpperBoundedSet<T>
Source§impl<T, R> RangeUnion<R, LowerBoundedSet<T>> for UpperBoundedSet<T>
impl<T, R> RangeUnion<R, LowerBoundedSet<T>> for UpperBoundedSet<T>
Source§impl<T, R> RangeUnion<R, UnboundedRange> for UpperBoundedSet<T>
impl<T, R> RangeUnion<R, UnboundedRange> for UpperBoundedSet<T>
Source§impl<T, R> RangeUnion<R, UnboundedSet<T>> for UpperBoundedSet<T>
impl<T, R> RangeUnion<R, UnboundedSet<T>> for UpperBoundedSet<T>
Source§impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for Range<T>
impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for Range<T>
Source§impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for RangeFrom<T>
impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for RangeFrom<T>
Source§impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for RangeFullwhere
R: Rangetools<Set = UpperBoundedSet<T>>,
impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for RangeFullwhere
R: Rangetools<Set = UpperBoundedSet<T>>,
Source§impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for RangeInclusive<T>
impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for RangeInclusive<T>
Source§impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for RangeTo<T>
impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for RangeTo<T>
Source§impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for RangeToInclusive<T>
impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for RangeToInclusive<T>
Source§impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for BoundedRange<T>
impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for BoundedRange<T>
Source§impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for LowerBoundedRange<T>
impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for LowerBoundedRange<T>
Source§impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for UpperBoundedRange<T>
impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for UpperBoundedRange<T>
Source§impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for BoundedSet<T>
impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for BoundedSet<T>
Source§impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for LowerBoundedSet<T>
impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for LowerBoundedSet<T>
Source§impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for UnboundedSet<T>
impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for UnboundedSet<T>
Source§impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for UpperBoundedSet<T>
impl<T, R> RangeUnion<R, UpperBoundedSet<T>> for UpperBoundedSet<T>
Source§impl<T> Rangetools for UpperBoundedSet<T>
impl<T> Rangetools for UpperBoundedSet<T>
Source§type Inner = UpperBoundedSet<T>
type Inner = UpperBoundedSet<T>
The generalized type of the range (for consolidating range types that only differ in
whether their bounds are inclusive or exclusive). Read more
Source§type Set = UpperBoundedSet<T>
type Set = UpperBoundedSet<T>
The set type of the range, for talking about non-contiguous collections of
elements. Read more
Source§fn complement<Output>(self) -> Outputwhere
Self: Sized + RangeComplement<Output>,
fn complement<Output>(self) -> Outputwhere
Self: Sized + RangeComplement<Output>,
Source§fn intersection<R, Output>(self, other: R) -> Output
fn intersection<R, Output>(self, other: R) -> Output
Source§fn disjoint<R, Output>(self, other: R) -> boolwhere
R: Rangetools,
Output: Rangetools,
Self: Sized + RangeIntersection<R, R::Inner, Output = Output>,
fn disjoint<R, Output>(self, other: R) -> boolwhere
R: Rangetools,
Output: Rangetools,
Self: Sized + RangeIntersection<R, R::Inner, Output = Output>,
Returns true if two sets/ranges are disjoint (they have no elements in common). Read more
Source§fn intersects<R, Output>(self, other: R) -> boolwhere
R: Rangetools,
Output: Rangetools,
Self: Sized + RangeIntersection<R, R::Inner, Output = Output>,
fn intersects<R, Output>(self, other: R) -> boolwhere
R: Rangetools,
Output: Rangetools,
Self: Sized + RangeIntersection<R, R::Inner, Output = Output>,
Returns true if two sets/ranges intersect (they have at least one element in common). Read more
impl<T: PartialEq> StructuralPartialEq for UpperBoundedSet<T>
Auto Trait Implementations§
impl<T> Freeze for UpperBoundedSet<T>
impl<T> RefUnwindSafe for UpperBoundedSet<T>
impl<T> Send for UpperBoundedSet<T>
impl<T> Sync for UpperBoundedSet<T>
impl<T> Unpin for UpperBoundedSet<T>
impl<T> UnsafeUnpin for UpperBoundedSet<T>
impl<T> UnwindSafe for UpperBoundedSet<T>
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