Module key_value_store_view

Source
Expand description

The implementation of a key-value store view. We implement two types:

  1. The first type KeyValueStoreView implements View and the function of KeyValueStore.

  2. The second type ViewContainer encapsulates KeyValueStoreView and provides the following functionalities:

    • The Clone trait
    • a write_batch that takes a &self instead of a &mut self
    • a write_batch that writes in the context instead of writing of the view.

Currently, that second type is only used for tests.

Key tags to create the sub-keys of a KeyValueStoreView on top of the base key.

Structs§

KeyValueStoreView
A view that represents the functions of KeyValueStore.
SizeData
A pair containing the key and value size.
ViewContainer
A virtual DB client using a KeyValueStoreView as a backend (testing only).

Enums§

ViewContainerError
The error type for ViewContainer operations.

Type Aliases§

HashedKeyValueStoreView
Type wrapping KeyValueStoreView while memoizing the hash.
HistoricallyHashedKeyValueStoreView
Wrapper around KeyValueStoreView to compute hashes based on the history of changes.