Kagome
Polkadot Runtime Engine in C++17
polkadot_trie_cursor.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CORE_STORAGE_TRIE_POLKADOT_TRIE_POLKADOT_TRIE_CURSOR
7 #define KAGOME_CORE_STORAGE_TRIE_POLKADOT_TRIE_POLKADOT_TRIE_CURSOR
8 
10 
11 #include "common/buffer.hpp"
13 
14 namespace kagome::storage::trie {
15 
16  class PolkadotTrieCursor : public face::MapCursor<common::Buffer,
17  common::BufferConstRef,
18  common::BufferView> {
19  public:
20  virtual ~PolkadotTrieCursor() override = default;
21 
26  virtual outcome::result<void> seekLowerBound(
27  const common::BufferView &key) = 0;
28 
33  virtual outcome::result<void> seekUpperBound(
34  const common::BufferView &key) = 0;
35  };
36 
37 } // namespace kagome::storage::trie
38 
39 #endif // KAGOME_CORE_STORAGE_TRIE_POLKADOT_TRIE_POLKADOT_TRIE_CURSOR
An abstraction over generic map cursor.
Definition: map_cursor.hpp:22
virtual ~PolkadotTrieCursor() override=default
virtual std::optional< common::Buffer > key() const =0
Getter for the key of the element currently pointed at.
virtual outcome::result< void > seekLowerBound(const common::BufferView &key)=0
virtual outcome::result< void > seekUpperBound(const common::BufferView &key)=0