csmt v1.0.0 Storage behaviour

Defines a general key-value storage for persisting and retrieval of the Compact Sparse Merkle Tree Nodes CSMT.Types.tree_node/0. We define callbacks that can be implemented by a number of potential backends.

Link to this section Summary

Functions

Deletes a node with the specified key from the given backend

Retrieves a node with the specified key from the given backend

Persists a node with the specified key, value in the given backend

Link to this section Functions

Link to this function delete_node(backend, key)

Deletes a node with the specified key from the given backend.

Link to this function get_node(backend, key)

Retrieves a node with the specified key from the given backend.

Link to this function set_node(backend, key, value)

Persists a node with the specified key, value in the given backend.

Link to this section Callbacks

Link to this callback delete_node(term, term)
delete_node(term(), term()) :: term()
Link to this callback get_node(term, term)
get_node(term(), term()) :: term()
Link to this callback init_backend(term)
init_backend(term()) :: term()
Link to this callback set_node(term, term, term)
set_node(term(), term(), term()) :: term()