1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
//! `List`s are collections like `Vec`, `Slice`, ... //! pub mod ro; pub mod rw; use std::ops::Index; pub struct ListIndex<'a, I>(&'a I); impl<I> Index<&usize> for ListIndex<'_, I> where I: Index<usize>, { type Output = I::Output; fn index(&self, index: &usize) -> &Self::Output { self.0.index(*index) } }