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
---------------------------------------- <- Address 28 (PACKED_HEADER_SIZE)
Reserved space              ↕ 24 bytes
---------------------------------------- <- Address 52 (ALLOCATOR_OFFSET)
Allocator
----------------------------------------
... free memory for nodes
----------------------------------------

Structs

Enums

  • An error returned when inserting entries into the map.