pub trait RangeExt<T>where
    Self: Sized,{
    // Required method
    fn from_range_bounds<B>(bounds: B, min_incl: T, max_excl: T) -> Option<Self>
       where B: RangeBounds<T>;
}
Expand description

An extension trait for ranges

Required Methods§

source

fn from_range_bounds<B>(bounds: B, min_incl: T, max_excl: T) -> Option<Self>where B: RangeBounds<T>,

Creates Self from the given range bounds and validates that it is within min_incl and max_excl

Implementations on Foreign Types§

source§

impl RangeExt<u64> for RangeInclusive<u64>

source§

fn from_range_bounds<B>(bounds: B, min_incl: u64, max_excl: u64) -> Option<Self>where B: RangeBounds<u64>,

source§

impl RangeExt<usize> for Range<usize>

source§

fn from_range_bounds<B>( bounds: B, min_incl: usize, max_excl: usize ) -> Option<Self>where B: RangeBounds<usize>,

source§

impl RangeExt<u64> for Range<u64>

source§

fn from_range_bounds<B>(bounds: B, min_incl: u64, max_excl: u64) -> Option<Self>where B: RangeBounds<u64>,

source§

impl RangeExt<usize> for RangeInclusive<usize>

source§

fn from_range_bounds<B>( bounds: B, min_incl: usize, max_excl: usize ) -> Option<Self>where B: RangeBounds<usize>,

Implementors§