Trait macro_tools::exposed::NonIterableInterval  
source · pub trait NonIterableInterval<T = isize>{
    // Required methods
    fn left(&self) -> Bound<T>;
    fn right(&self) -> Bound<T>;
    // Provided methods
    fn bounds(&self) -> (Bound<T>, Bound<T>) { ... }
    fn closed_left(&self) -> T { ... }
    fn closed_right(&self) -> T { ... }
    fn closed_len(&self) -> T { ... }
    fn closed(&self) -> (T, T) { ... }
    fn canonical(&self) -> Interval<T> { ... }
}Expand description
Interval adapter. Interface to interval-like structures.
NonIterableInterval it does not implement iterator unlike IterableInterval.
IterableInterval inherits all methods of NonIterableInterval.
Non-iterable intervals have either one or several unbound endpoints.
For example, interval core::ops::RangeFull has no bounds and represents the range from minus infinity to plus infinity.
Required Methods§
Provided Methods§
sourcefn bounds(&self) -> (Bound<T>, Bound<T>)
 
fn bounds(&self) -> (Bound<T>, Bound<T>)
Interval in closed format as pair of numbers. To convert open endpoint to closed add or subtract one.
sourcefn closed_left(&self) -> T
 
fn closed_left(&self) -> T
The left endpoint of the interval, converting interval into closed one.
sourcefn closed_right(&self) -> T
 
fn closed_right(&self) -> T
The right endpoint of the interval, converting interval into closed one.
sourcefn closed_len(&self) -> T
 
fn closed_len(&self) -> T
Length of the interval, converting interval into closed one.