pub struct Interval<T> { /* private fields */ }Implementations§
Source§impl<T: Debug + Default + Clone + PartialEq + PartialOrd> Interval<T>
impl<T: Debug + Default + Clone + PartialEq + PartialOrd> Interval<T>
pub fn new(lower: IntervalLimit<T>, upper: IntervalLimit<T>) -> Self
pub fn and_more(lower: LimitValue<T>) -> Self
pub fn closed(lower: LimitValue<T>, upper: LimitValue<T>) -> Self
pub fn more_than(lower: LimitValue<T>) -> Self
pub fn open(lower: LimitValue<T>, upper: LimitValue<T>) -> Self
pub fn over( lower: LimitValue<T>, lower_included: bool, upper: LimitValue<T>, upper_included: bool, ) -> Self
pub fn single_element(element: LimitValue<T>) -> Self
pub fn under(upper: LimitValue<T>) -> Self
pub fn up_to(upper: LimitValue<T>) -> Self
pub fn is_single_element(&self) -> bool
pub fn empty_of_same_type(&self) -> Self
pub fn intersects(&self, other: &Self) -> bool
pub fn lower_limit(&self) -> &LimitValue<T>
pub fn upper_limit(&self) -> &LimitValue<T>
pub fn has_upper_limit(&self) -> bool
pub fn has_lower_limit(&self) -> bool
pub fn includes_upper_limit(&self) -> bool
pub fn includes_lower_limit(&self) -> bool
pub fn is_below(&self, value: &LimitValue<T>) -> bool
pub fn is_above(&self, value: &LimitValue<T>) -> bool
pub fn is_open(&self) -> bool
pub fn is_closed(&self) -> bool
Trait Implementations§
Source§impl<T: Debug + Default + Clone + PartialEq + PartialOrd> From<(LimitValue<T>, bool, LimitValue<T>, bool)> for Interval<T>
impl<T: Debug + Default + Clone + PartialEq + PartialOrd> From<(LimitValue<T>, bool, LimitValue<T>, bool)> for Interval<T>
Source§fn from(
(lower, is_lower_closed, upper, is_upper_closed): (LimitValue<T>, bool, LimitValue<T>, bool),
) -> Self
fn from( (lower, is_lower_closed, upper, is_upper_closed): (LimitValue<T>, bool, LimitValue<T>, bool), ) -> Self
Converts to this type from the input type.
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