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

Creates a GapBuffer containing the arguments.

Structs

A draining iterator for GapBuffer.

Dynamic array that allows efficient insertion and deletion operations clustered near the same location.

An iterator that moves out of a GapBuffer.

Immutable sub-range of GapBuffer

Mutable sub-range of GapBuffer.

Sub-range of GapBuffer. Slice define common method for GapBuffer, Range, RangeMut.

A splicing iterator for GapBuffer.

Type Definitions

Immutable GapBuffer iterator.

Mutable GapBuffer iterator.