[][src]Trait index_vec::IdxRangeBounds

pub trait IdxRangeBounds<I>: Sealed where
    I: Idx
{ type Range: RangeBounds<usize>; fn into_range(self) -> Self::Range; }

This trait to function in API signatures where Vec<T> or [T] use R: RangeBounds<usize>. There are blanket implementations for the basic range types in core::ops for all Idx types. e.g. Range<I: Idx>, RangeFrom<I: Idx>, RangeTo<I: Idx>, etc all implement it.

IMO it's unfortunate that this needs to be present in the API, but it doesn't hurt that much.

Associated Types

type Range: RangeBounds<usize>

Loading content...

Required methods

fn into_range(self) -> Self::Range

Loading content...

Implementations on Foreign Types

impl<I: Idx> IdxRangeBounds<I> for Range<I>[src]

type Range = Range<usize>

impl<I: Idx> IdxRangeBounds<I> for RangeFrom<I>[src]

type Range = RangeFrom<usize>

impl<I: Idx> IdxRangeBounds<I> for RangeFull[src]

type Range = RangeFull

impl<I: Idx> IdxRangeBounds<I> for RangeTo<I>[src]

type Range = RangeTo<usize>

impl<I: Idx> IdxRangeBounds<I> for RangeInclusive<I>[src]

type Range = RangeInclusive<usize>

impl<I: Idx> IdxRangeBounds<I> for RangeToInclusive<I>[src]

type Range = RangeToInclusive<usize>

Loading content...

Implementors

Loading content...