Macro sliceable_indexing

Source
macro_rules! sliceable_indexing {
    (<$($parameter:tt),*>, $a_type:ty) => { ... };
}
Expand description

A generic Index representation would conflict with one provided by Rust, and the given function is unimplementable for trait objects, so this macro provides an easy way to produce an Index impl that just calls slice() as expected.

If the slice is out of bounds, or for any other reason slice() returns None, the implementation panics.