Crate gapbuf

Source
Expand description

gapbuf provides the type GapBuffer. GapBuffer has methods similar to Vec.

§Examples

use gapbuf::gap_buffer;

let mut b = gap_buffer![1, 2, 3];

b.insert(1, 10);
assert_eq!(b, [1, 10, 2, 3]);

b.remove(2);
assert_eq!(b, [1, 10, 3]);

Macros§

gap_buffer
Creates a GapBuffer containing the arguments.

Structs§

Drain
A draining iterator for GapBuffer.
GapBuffer
Dynamic array that allows efficient insertion and deletion operations clustered near the same location.
IntoIter
An iterator that moves out of a GapBuffer.
Range
Immutable sub-range of GapBuffer
RangeMut
Mutable sub-range of GapBuffer.
Slice
Sub-range of GapBuffer. Slice define common method for GapBuffer, Range, RangeMut.
Splice
A splicing iterator for GapBuffer.

Type Aliases§

Iter
Immutable GapBuffer iterator.
IterMut
Mutable GapBuffer iterator.