michis_collection_cursor 0.1.3

A cursor which wraps an indexable collection, providing a movable position which points to an index of the collection. Useful for things like history, undo-redo systems, or timelines.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use arrayvec::ArrayVec;

use crate::{IndexableCollection, IndexableCollectionMut, IndexableCollectionResizable};

impl<T, const CAP: usize> IndexableCollection for ArrayVec<T, CAP> {
	type Item = T;
	forward_indexable!();
}

impl<T, const CAP: usize> IndexableCollectionMut for ArrayVec<T, CAP> {
	forward_mutable!();
}

impl<T, const CAP: usize> IndexableCollectionResizable for ArrayVec<T, CAP> {
	forward_resizable!(check_len_on_remove = true);
}