Expand description

This module implements a key/value store based on a B-Tree in stable memory.

V1 layout

---------------------------------------- <- Address 0
Magic "BTR"                 ↕ 3 bytes
----------------------------------------
Layout version              ↕ 1 byte
----------------------------------------
Max key size                ↕ 4 bytes
----------------------------------------
Max value size              ↕ 4 bytes
----------------------------------------
Root node address           ↕ 8 bytes
----------------------------------------
Length (number of elements) ↕ 8 bytes
----------------------------------------
Reserved space              ↕ 24 bytes
---------------------------------------- <- Address 52
Allocator
----------------------------------------
... free memory for nodes
----------------------------------------

Structs

A “stable” map based on a B-tree.
An iterator over the entries of a BTreeMap.

Enums

An error returned when inserting entries into the map.