Kagome
Polkadot Runtime Engine in C++17
|
An abstraction over generic map cursor. More...
#include <map_cursor.hpp>
Public Member Functions | |
virtual | ~MapCursor ()=default |
virtual outcome::result< bool > | seekFirst ()=0 |
Same as std::begin(...);. More... | |
virtual outcome::result< bool > | seek (const KView &key)=0 |
Find given key and seek iterator to this key. More... | |
virtual outcome::result< bool > | seekLast ()=0 |
Same as std::rbegin(...);, e.g. points to the last valid element. More... | |
virtual bool | isValid () const =0 |
Is the cursor in a valid state? More... | |
virtual outcome::result< void > | next ()=0 |
Make step forward. More... | |
virtual std::optional< K > | key () const =0 |
Getter for the key of the element currently pointed at. More... | |
virtual std::optional< V > | value () const =0 |
Getter for value of the element currently pointed at. More... | |
An abstraction over generic map cursor.
K | key type |
V | value type |
KView | key view type |
Definition at line 22 of file map_cursor.hpp.
|
virtualdefault |
|
pure virtual |
Is the cursor in a valid state?
Implemented in kagome::storage::trie::PolkadotTrieCursorImpl, and kagome::storage::RocksDBCursor.
|
pure virtual |
Getter for the key of the element currently pointed at.
Implemented in kagome::storage::trie::PolkadotTrieCursorImpl, and kagome::storage::RocksDBCursor.
|
pure virtual |
Make step forward.
Implemented in kagome::storage::trie::PolkadotTrieCursorImpl, and kagome::storage::RocksDBCursor.
|
pure virtual |
Find given key and seek iterator to this key.
Implemented in kagome::storage::trie::PolkadotTrieCursorImpl.
|
pure virtual |
Same as std::begin(...);.
Implemented in kagome::storage::trie::PolkadotTrieCursorImpl, and kagome::storage::RocksDBCursor.
|
pure virtual |
Same as std::rbegin(...);, e.g. points to the last valid element.
Implemented in kagome::storage::trie::PolkadotTrieCursorImpl, and kagome::storage::RocksDBCursor.
|
pure virtual |
Getter for value of the element currently pointed at.
Implemented in kagome::storage::trie::PolkadotTrieCursorImpl, and kagome::storage::RocksDBCursor.