Kagome
Polkadot Runtime Engine in C++17
kagome::storage::trie::PolkadotTrieCursor Class Referenceabstract

#include <polkadot_trie_cursor.hpp>

Inheritance diagram for kagome::storage::trie::PolkadotTrieCursor:
Collaboration diagram for kagome::storage::trie::PolkadotTrieCursor:

Public Member Functions

virtual ~PolkadotTrieCursor () override=default
 
virtual outcome::result< void > seekLowerBound (const common::BufferView &key)=0
 
virtual outcome::result< void > seekUpperBound (const common::BufferView &key)=0
 
- Public Member Functions inherited from kagome::storage::face::MapCursor< common::Buffer, common::BufferConstRef, common::BufferView >
virtual ~MapCursor ()=default
 
virtual outcome::result< bool > seekFirst ()=0
 Same as std::begin(...);. More...
 
virtual outcome::result< bool > seek (const common::BufferView &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< common::Bufferkey () const =0
 Getter for the key of the element currently pointed at. More...
 
virtual std::optional< common::BufferConstRefvalue () const =0
 Getter for value of the element currently pointed at. More...
 

Detailed Description

Definition at line 16 of file polkadot_trie_cursor.hpp.

Constructor & Destructor Documentation

virtual kagome::storage::trie::PolkadotTrieCursor::~PolkadotTrieCursor ( )
overridevirtualdefault

Member Function Documentation

virtual outcome::result<void> kagome::storage::trie::PolkadotTrieCursor::seekLowerBound ( const common::BufferView key)
pure virtual

Seek the first element with key not less than

  • key
    Returns
    true if the trie is not empty

Implemented in kagome::storage::trie::PolkadotTrieCursorImpl.

virtual outcome::result<void> kagome::storage::trie::PolkadotTrieCursor::seekUpperBound ( const common::BufferView key)
pure virtual

Seek the first element with key greater than

  • key
    Returns
    true if the trie is not empty

Implemented in kagome::storage::trie::PolkadotTrieCursorImpl.


The documentation for this class was generated from the following file: