Kagome
Polkadot Runtime Engine in C++17
kagome::storage::face::ReadableStorage< K, V > Struct Template Referenceabstract

#include <readable.hpp>

Inheritance diagram for kagome::storage::face::ReadableStorage< K, V >:
Collaboration diagram for kagome::storage::face::ReadableStorage< K, V >:

Public Types

using Key = K
 
using Value = V
 
- Public Types inherited from kagome::storage::face::ReadableBase< K >
using Key = K
 

Public Member Functions

virtual ~ReadableStorage ()=default
 
virtual outcome::result< V > load (const Key &key) const =0
 Load value by key. More...
 
virtual outcome::result< std::optional< V > > tryLoad (const Key &key) const =0
 Load value by key. More...
 
- Public Member Functions inherited from kagome::storage::face::ReadableBase< K >
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...
 

Detailed Description

template<typename K, typename V>
struct kagome::storage::face::ReadableStorage< K, V >

Definition at line 65 of file readable.hpp.

Member Typedef Documentation

template<typename K, typename V>
using kagome::storage::face::ReadableStorage< K, V >::Key = K

Definition at line 66 of file readable.hpp.

template<typename K, typename V>
using kagome::storage::face::ReadableStorage< K, V >::Value = V

Definition at line 67 of file readable.hpp.

Constructor & Destructor Documentation

template<typename K, typename V>
virtual kagome::storage::face::ReadableStorage< K, V >::~ReadableStorage ( )
virtualdefault

Member Function Documentation

template<typename K, typename V>
virtual outcome::result<V> kagome::storage::face::ReadableStorage< K, V >::load ( const Key key) const
pure virtual

Load value by key.

Parameters
keyK
Returns
V

Implemented in kagome::storage::RocksDB.

template<typename K, typename V>
virtual outcome::result<std::optional<V> > kagome::storage::face::ReadableStorage< K, V >::tryLoad ( const Key key) const
pure virtual

Load value by key.

Parameters
keyK
Returns
V if contains(K) or std::nullopt

Implemented in kagome::storage::RocksDB.


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