[][src]Crate gap_vec

A contiguous growable array type with heap-allocated contens and gap. It's written GapVec<T> but pronounced 'gap vector'.

Examples

You can explicitly create a GapVec<T> with new:

use gap_vec::GapVec;

let mut gap_vec: GapVec<i32> = GapVec::new();

You can insert values (which will grow the gap vector as needed):

use gap_vec::GapVec;

let mut gap_vec = GapVec::new();

gap_vec.insert("onion".to_string());

You can remove values in much the same way:

use gap_vec::GapVec;

let mut gap_vec = GapVec::new();

gap_vec.insert("foo".to_string());
gap_vec.set_position(0);
assert_eq!(gap_vec.remove().unwrap(), "foo".to_string());

Structs

GapVec

A contiguous growable array type with heap-allocated contens and gap. It's written GapVec<T> but pronounced 'gap vector'.

Iter

An iterator for GapVec<T>.