pub struct Segment<K> { /* private fields */ }
Implementations§
Source§impl<K> Segment<K>where
K: PartialOrd,
impl<K> Segment<K>where
K: PartialOrd,
pub fn new(lower: K, upper: K) -> Segment<K>
pub fn closed_open(lower: K, upper: K) -> Segment<K>
pub fn contains(&self, value: &K) -> bool
pub fn encloses(&self, other: &Segment<K>) -> bool
pub fn is_connected(&self, other: &Segment<K>) -> bool
pub fn is_empty(&self) -> bool
pub fn lower(&self) -> &K
pub fn upper(&self) -> &K
Source§impl<K> Segment<K>where
K: Clone + PartialOrd,
impl<K> Segment<K>where
K: Clone + PartialOrd,
Source§impl<K> Segment<K>where
K: PartialOrd + Next,
impl<K> Segment<K>where
K: PartialOrd + Next,
Trait Implementations§
Source§impl<K: Ord> Ord for Segment<K>
impl<K: Ord> Ord for Segment<K>
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<K: PartialOrd> PartialOrd for Segment<K>
impl<K: PartialOrd> PartialOrd for Segment<K>
impl<K: Copy> Copy for Segment<K>
impl<K: Eq> Eq for Segment<K>
impl<K> StructuralPartialEq for Segment<K>
Auto Trait Implementations§
impl<K> Freeze for Segment<K>where
K: Freeze,
impl<K> RefUnwindSafe for Segment<K>where
K: RefUnwindSafe,
impl<K> Send for Segment<K>where
K: Send,
impl<K> Sync for Segment<K>where
K: Sync,
impl<K> Unpin for Segment<K>where
K: Unpin,
impl<K> UnwindSafe for Segment<K>where
K: 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