pub trait RangeClamp {
    // Provided method
    fn clamp(
        self,
        start_bound: Self::Item,
        end_bound: Self::Item
    ) -> Range<Self::Item>
       where Self::Item: Debug + Ord + Copy + Add,
             Self: Sized + Iterator + RangeBounds<<Self as Iterator>::Item> { ... }
}
Expand description

Provides the clamp() method for Range, clamping it to a given interval.

Provided Methods§

source

fn clamp( self, start_bound: Self::Item, end_bound: Self::Item ) -> Range<Self::Item>where Self::Item: Debug + Ord + Copy + Add, Self: Sized + Iterator + RangeBounds<<Self as Iterator>::Item>,

Clamps a range to a given start_bound and end_bound.

Implementors§