Skip to main content

IntervalBounds

Trait IntervalBounds 

pub trait IntervalBounds {
    // Required method
    fn into_interval(self, upper_bound: usize) -> Interval;
}
Expand description

A trait for types that represent unbounded ranges; they need an explicit upper bound in order to be converted to Intervals.

This exists so that some methods that use Interval under the hood can accept arguments like .. or 10...

This trait should only be used when the idea of taking all of something makes sense.

Required Methods§

fn into_interval(self, upper_bound: usize) -> Interval

Implementations on Foreign Types§

§

impl IntervalBounds for RangeFrom<usize>

§

fn into_interval(self, upper_bound: usize) -> Interval

§

impl IntervalBounds for RangeFull

§

fn into_interval(self, upper_bound: usize) -> Interval

Implementors§

§

impl<T> IntervalBounds for T
where T: Into<Interval>,