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]
Source§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>
Source§type Output = [I; LENGTH]
type Output = [I; LENGTH]
The returned type after indexing.
Source§impl<T, const START: usize, const LENGTH: usize, const N: usize> IndexMut<StaticRangeIndex<START, LENGTH>> for [T; N]
impl<T, const START: usize, const LENGTH: usize, const N: usize> IndexMut<StaticRangeIndex<START, LENGTH>> for [T; N]
Auto Trait Implementations§
impl<const START: usize, const LENGTH: usize> Freeze for StaticRangeIndex<START, LENGTH>
impl<const START: usize, const LENGTH: usize> RefUnwindSafe for StaticRangeIndex<START, LENGTH>
impl<const START: usize, const LENGTH: usize> Send for StaticRangeIndex<START, LENGTH>
impl<const START: usize, const LENGTH: usize> Sync for StaticRangeIndex<START, LENGTH>
impl<const START: usize, const LENGTH: usize> Unpin for StaticRangeIndex<START, LENGTH>
impl<const START: usize, const LENGTH: usize> UnwindSafe for StaticRangeIndex<START, LENGTH>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more