[−][src]Crate shifted_vec
A growable datastructure with positive and negative indexing built on top of std::vec::Vec
calculating the offset automatically.
use shifted_vec::ShiftedVec; let mut v = ShiftedVec::with_offset_and_capacity(-2, 5); // populate the ShiftedVec v.push(0); v.push(1); v.push(2); v.push(3); v.push(4); assert_eq!(5, v.len()); assert_eq!(2, v[0]); // mutable access with index v[0] = 5; assert_eq!(5, v[0]);
Structs
ShiftedIterator | See |
ShiftedIteratorMut | |
ShiftedVec | Wrapping the |