inter-val 0.1.2

Mathematical intervals, i.g., [a, b], (a, b), [a, b), and (a, b] on ℝ, and multi-dimensional axis-aligned boxes represented as Cartesian product of intervals.
Documentation
use crate::{Exclusive, Inclusive, LeftBounded, RightBounded};
use std::ops::{Bound, RangeBounds};

impl<T: PartialOrd> RangeBounds<T> for LeftBounded<T, Inclusive> {
    fn start_bound(&self) -> Bound<&T> {
        Bound::Included(&self.limit)
    }
    fn end_bound(&self) -> Bound<&T> {
        Bound::Unbounded
    }
}
impl<T: PartialOrd> RangeBounds<T> for LeftBounded<T, Exclusive> {
    fn start_bound(&self) -> Bound<&T> {
        Bound::Excluded(&self.limit)
    }
    fn end_bound(&self) -> Bound<&T> {
        Bound::Unbounded
    }
}
impl<T: PartialOrd> RangeBounds<T> for RightBounded<T, Inclusive> {
    fn start_bound(&self) -> Bound<&T> {
        Bound::Unbounded
    }
    fn end_bound(&self) -> Bound<&T> {
        Bound::Included(&self.limit)
    }
}
impl<T: PartialOrd> RangeBounds<T> for RightBounded<T, Exclusive> {
    fn start_bound(&self) -> Bound<&T> {
        Bound::Unbounded
    }
    fn end_bound(&self) -> Bound<&T> {
        Bound::Excluded(&self.limit)
    }
}