| 
    Kagome
    
   Polkadot Runtime Engine in C++17 
   | 
 
#include <polkadot_trie.hpp>
Public Member Functions | |
| virtual outcome::result< std::tuple< bool, uint32_t > > | clearPrefix (const common::BufferView &prefix, std::optional< uint64_t > limit, const OnDetachCallback &callback)=0 | 
| virtual NodePtr | getRoot ()=0 | 
| virtual ConstNodePtr | getRoot () const =0 | 
| virtual outcome::result< ConstNodePtr > | retrieveChild (const BranchNode &parent, uint8_t idx) const =0 | 
| virtual outcome::result< NodePtr > | retrieveChild (const BranchNode &parent, uint8_t idx)=0 | 
| virtual outcome::result< NodePtr > | getNode (ConstNodePtr parent, const NibblesView &key_nibbles)=0 | 
| virtual outcome::result< ConstNodePtr > | getNode (ConstNodePtr parent, const NibblesView &key_nibbles) const =0 | 
| virtual outcome::result< void > | forNodeInPath (ConstNodePtr parent, const NibblesView &path, const std::function< outcome::result< void >(BranchNode const &, uint8_t idx)> &callback) const =0 | 
| virtual std::unique_ptr< PolkadotTrieCursor > | trieCursor ()=0 | 
| std::unique_ptr< Cursor > | cursor () final | 
| Returns new key-value iterator.  More... | |
  Public Member Functions inherited from kagome::storage::face::Iterable< common::Buffer, ReadableMap< common::Buffer, common::Buffer >::ConstValueView, common::BufferView > | |
| virtual | ~Iterable ()=default | 
  Public Member Functions inherited from kagome::storage::face::ReadableMap< common::BufferView, common::Buffer > | |
| virtual | ~ReadableMap ()=default | 
| virtual outcome::result< ConstValueView > | get (const Key &key) const =0 | 
| Get value by key.  More... | |
| virtual outcome::result< std::optional< ConstValueView > > | tryGet (const Key &key) const =0 | 
| Get value by key.  More... | |
  Public Member Functions inherited from kagome::storage::face::ReadableBase< common::BufferView > | |
| virtual | ~ReadableBase ()=default | 
| virtual outcome::result< bool > | contains (const Key &key) const =0 | 
| Checks if given key-value binding exists in the storage.  More... | |
| virtual bool | empty () const =0 | 
| Returns true if the storage is empty.  More... | |
  Public Member Functions inherited from kagome::storage::face::Writeable< common::BufferView, common::Buffer > | |
| virtual | ~Writeable ()=default | 
| virtual outcome::result< void > | put (const common::BufferView &key, const common::Buffer &value)=0 | 
| Store value by key.  More... | |
| virtual outcome::result< void > | put (const common::BufferView &key, common::Buffer &&value)=0 | 
| virtual outcome::result< void > | remove (const common::BufferView &key)=0 | 
| Remove value by key.  More... | |
Static Public Member Functions | |
| static outcome::result< NodePtr > | defaultNodeRetrieveFunctor (const std::shared_ptr< OpaqueTrieNode > &node) | 
For specification see Polkadot Runtime Environment Protocol Specification '2.1.2 The General Tree Structure' and further
Definition at line 20 of file polkadot_trie.hpp.
| using kagome::storage::trie::PolkadotTrie::BranchPtr = std::shared_ptr<BranchNode> | 
Definition at line 27 of file polkadot_trie.hpp.
| using kagome::storage::trie::PolkadotTrie::ConstBranchPtr = std::shared_ptr<const BranchNode> | 
Definition at line 28 of file polkadot_trie.hpp.
| using kagome::storage::trie::PolkadotTrie::ConstNodePtr = std::shared_ptr<const TrieNode> | 
Definition at line 26 of file polkadot_trie.hpp.
| using kagome::storage::trie::PolkadotTrie::NodePtr = std::shared_ptr<TrieNode> | 
Definition at line 25 of file polkadot_trie.hpp.
| using kagome::storage::trie::PolkadotTrie::NodeRetrieveFunctor = std::function<outcome::result<NodePtr>( std::shared_ptr<OpaqueTrieNode> const &)> | 
Definition at line 30 of file polkadot_trie.hpp.
| using kagome::storage::trie::PolkadotTrie::OnDetachCallback = std::function<outcome::result<void>( const common::BufferView &key, std::optional<common::Buffer> &&value)> | 
This callback is called when a node is detached from a trie. It is called for each leaf from the detached node subtree
Definition at line 37 of file polkadot_trie.hpp.
      
  | 
  pure virtual | 
Remove all trie entries which key begins with the supplied prefix
| prefix | key prefix for nodes to be removed | 
| limit | number of elements to remove, std::nullopt if no limit | 
| callback | function that will be called for each node removal | 
Implemented in kagome::storage::trie::PolkadotTrieImpl.
      
  | 
  inlinefinalvirtual | 
      
  | 
  inlinestatic | 
Definition at line 94 of file polkadot_trie.hpp.
      
  | 
  pure virtual | 
Invokes callback on each node starting from
Implemented in kagome::storage::trie::PolkadotTrieImpl.
      
  | 
  pure virtual | 
Implemented in kagome::storage::trie::PolkadotTrieImpl.
      
  | 
  pure virtual | 
Implemented in kagome::storage::trie::PolkadotTrieImpl.
      
  | 
  pure virtual | 
Implemented in kagome::storage::trie::PolkadotTrieImpl.
      
  | 
  pure virtual | 
Implemented in kagome::storage::trie::PolkadotTrieImpl.
      
  | 
  pure virtual | 
Implemented in kagome::storage::trie::PolkadotTrieImpl.
      
  | 
  pure virtual | 
Implemented in kagome::storage::trie::PolkadotTrieImpl.
      
  | 
  pure virtual | 
Implemented in kagome::storage::trie::PolkadotTrieImpl.