logo
pub trait IntervalAdapter<T = isize> where
    T: Sub<T, Output = T> + Add<T, Output = T> + Copy,
    isize: Into<T>, 
{ fn first(&self) -> T; fn last(&self) -> T; fn len(&self) -> T { ... } fn closed(&self) -> (T, T) { ... } fn closed_open(&self) -> (T, T) { ... } fn first_len(&self) -> (T, T) { ... } }
Expand description

Interval adapter. Interface to interval-like structures.

Required Methods

the first element of the ( closed ) interval

the last element of the ( closed ) interval

Provided Methods

number of discrete elements in the interval

interval in closed format as pair of numbers

interval in closed-open format as pair of numbers

interval in first-length format as pair of numbers

Implementations on Foreign Types

Implementors