Proof of concept functions for (mutably) accessing a slice at multiple positions at once via an array of indices.
Provided APIs
This crate implements multiple APIs:
- "simple": accepts a sorted array
[usize; N]
of indices. - "simple_result": accepts a sorted array
[usize; N]
of indices, but with anResult
based API. - "slice_index": accepts a sorted array
[I; N]
of indices, whereI: SliceIndex<[T]>
. - "generic": uses a generic
I: Indices<N>
that allows for more flexibility.
Example
use index_many_mut;
let mut v = vec!;
let = index_many_mut;
*a += 10;
*b += 100;
*c += 1000;
assert_eq!;
Generated Assembly
The docs contain example functions with their x86_64 assembly codegen. See the [crate::_doc_assembly
] module.