pub struct Interval<T> { /* private fields */ }Implementations§
Source§impl<T> Interval<T>
impl<T> Interval<T>
pub fn from_bounds(b: impl RangeBounds<T>) -> Interval<T>
Source§impl<T> Interval<T>where
T: Ord,
impl<T> Interval<T>where
T: Ord,
pub fn inf(&self) -> Option<&T>
pub fn sup(&self) -> Option<&T>
pub fn is_empty(&self) -> bool
pub fn intersects(&self, other: &Interval<T>) -> bool
pub fn is_connected_with(&self, other: &Interval<T>) -> bool
pub fn is_subset_of(&self, other: &Interval<T>) -> bool
pub fn is_superset_of(&self, other: &Interval<T>) -> bool
pub fn intersection(self, other: Interval<T>) -> Option<Interval<T>>
pub fn connection(self, other: Interval<T>) -> Option<Interval<T>>
Trait Implementations§
Source§impl<T> Ord for Interval<T>where
T: Ord,
impl<T> Ord for Interval<T>where
T: Ord,
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T> PartialOrd for Interval<T>where
T: Ord,
impl<T> PartialOrd for Interval<T>where
T: Ord,
impl<T> Copy for Interval<T>where
T: Copy,
impl<T> Eq for Interval<T>where
T: Eq,
impl<T> StructuralPartialEq for Interval<T>
Auto Trait Implementations§
impl<T> Freeze for Interval<T>where
T: Freeze,
impl<T> RefUnwindSafe for Interval<T>where
T: RefUnwindSafe,
impl<T> Send for Interval<T>where
T: Send,
impl<T> Sync for Interval<T>where
T: Sync,
impl<T> Unpin for Interval<T>where
T: Unpin,
impl<T> UnwindSafe for Interval<T>where
T: UnwindSafe,
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