Struct static_slicing::StaticRangeIndex
source · pub struct StaticRangeIndex<const START: usize, const LENGTH: usize>;Expand description
A range index that exists entirely at compile time.
Range indexes can be used to obtain fixed-size slices.
For any pair of (START, LENGTH), the range covered is [START, START+LENGTH).
Trait Implementations§
source§impl<T, const START: usize, const LENGTH: usize, const N: usize> Index<StaticRangeIndex<START, LENGTH>> for [T; N]
impl<T, const START: usize, const LENGTH: usize, const N: usize> Index<StaticRangeIndex<START, LENGTH>> for [T; N]
§type Output = [T; LENGTH]
type Output = [T; LENGTH]
The returned type after indexing.
source§impl<I, S: AsRef<[I]>, const START: usize, const LENGTH: usize> Index<StaticRangeIndex<START, LENGTH>> for SliceWrapper<'_, I, S>
impl<I, S: AsRef<[I]>, const START: usize, const LENGTH: usize> Index<StaticRangeIndex<START, LENGTH>> for SliceWrapper<'_, I, S>
§type Output = [I; LENGTH]
type Output = [I; LENGTH]
The returned type after indexing.