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 smallvec::{Array, SmallVec};

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

impl<A: Array> IndexableCollection for SmallVec<A> {
	type Item = <A as Array>::Item;
	forward_indexable!();
}

impl<A: Array> IndexableCollectionMut for SmallVec<A> {
	forward_mutable!();
}

impl<A: Array> IndexableCollectionResizable for SmallVec<A> {
	forward_resizable!(check_len_on_remove = true);
}