Interval struct represents an interval.
The main appeal is that it allows checking if
a number is between the interval bounds more easily
than manually writing the inequality comparisons yourself.
impl<T: PartialOrd> Interval<T>[src]
new function enables construction of an Interval
without needing to think about which
boundary is greater.
contains function enables
easy checking if a value is contained in the open
version of an interval (the bounds are
not part of the interval).
pub fn contains_closed(&self, value: T) -> bool[src]
easy cheching if a value is contained in the contained
in the closed version of an interval (the bounds are
part of the interval).
The type returned in the event of a conversion error.