Struct nekolib::ds::interval_map::Interval
source · pub struct Interval<T> { /* private fields */ }
Implementations§
source§impl<T: Ord + Clone> Interval<T>
impl<T: Ord + Clone> Interval<T>
pub fn from_bounds(b: impl RangeBounds<T>) -> Self
source§impl<T: Ord> Interval<T>
impl<T: Ord> Interval<T>
pub fn inf(&self) -> Option<&T>
pub fn sup(&self) -> Option<&T>
pub fn is_empty(&self) -> bool
pub fn intersects(&self, other: &Self) -> bool
pub fn is_connected_with(&self, other: &Self) -> bool
pub fn is_subset_of(&self, other: &Self) -> bool
pub fn is_superset_of(&self, other: &Self) -> bool
pub fn intersection(self, other: Self) -> Option<Interval<T>>
pub fn connection(self, other: Self) -> Option<Interval<T>>
Trait Implementations§
source§impl<T: Ord> Ord for Interval<T>
impl<T: Ord> Ord for Interval<T>
source§impl<T: PartialEq> PartialEq<Interval<T>> for Interval<T>
impl<T: PartialEq> PartialEq<Interval<T>> for Interval<T>
source§impl<T: Ord> PartialOrd<Interval<T>> for Interval<T>
impl<T: Ord> PartialOrd<Interval<T>> for Interval<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: Copy> Copy for Interval<T>
impl<T: Eq> Eq for Interval<T>
impl<T> StructuralEq for Interval<T>
impl<T> StructuralPartialEq for Interval<T>
Auto Trait Implementations§
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