This is a POC to make [T]::get_many_mut
to accept either an array of index or a tuple of index.
See the test folder for example of the API usage.
This POC introduces three new traits:
SliceManyIndices<'slice, Slice: ?Sized>
similar toSliceIndex<T>
which is implemented for types that represent multiple indices (array and tuple) and gets the reference of the items from the slice.ManyIndices
which is also implemented for types represents multiple indices. This trait provides runtime checking for "does the indices are distinct ?" and "does the indices in bounds ?".IndexOverlap<T>
an operation that check if two index type overlap each other.
And one struct:
DisjointIndices<I>
which assert that the indices of a multiple indices value are disjoint.