Skip to content

tguichaoua/rust_slice_get_many_poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slice get_many_mut proof of concept

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 to SliceIndex<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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages