|
| static std::string | Insert (IStorageBackend &store, const std::string &root_hex, const Key &key, const Hash32 &payload) |
| | Insert or overwrite a (key, payload) mapping.
|
| static std::string | Remove (IStorageBackend &store, const std::string &root_hex, const Key &key) |
| | Remove a key from the tree.
|
| static std::optional< Hash32 > | Get (IStorageBackend &store, const std::string &root_hex, const Key &key) |
| | Look up the payload for a key.
|
| static std::vector< Entry > | Page (IStorageBackend &store, const std::string &root_hex, size_t offset, size_t limit) |
| | Page through entries in key-sorted order.
|
|
|
static constexpr size_t | B = 64 |
◆ Get()
Look up the payload for a key.
- Returns
- The payload when present, std::nullopt when absent.
◆ Insert()
Insert or overwrite a (key, payload) mapping.
- Parameters
-
| store | KV backend for node serialisation. |
| root_hex | Current root hash (empty string = empty tree). |
| key | Routing/identity key. |
| payload | Hash this key maps to (child root one level down, or the key itself at the relation level). |
- Returns
- New root hash. Equal to root_hex when an insertion of an identical (key, payload) pair would be a no-op.
◆ Page()
Page through entries in key-sorted order.
Descends to the leaf at logical position offset using cumulative leaf_counts stored in internal nodes, then walks forward collecting at most limit entries. Only the nodes on the active path are loaded; sibling subtrees are never touched.
◆ Remove()
Remove a key from the tree.
- Returns
- New root hash. Empty string when the tree becomes empty. Equal to root_hex when the key is absent.
The documentation for this class was generated from the following files: