Kagome
Polkadot Runtime Engine in C++17
writeable.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_WRITEABLE_HPP
7 #define KAGOME_WRITEABLE_HPP
8 
9 #include <outcome/outcome.hpp>
10 
11 namespace kagome::storage::face {
12 
18  template <typename K, typename V>
19  struct Writeable {
20  virtual ~Writeable() = default;
21 
28  virtual outcome::result<void> put(const K &key, const V &value) = 0;
29  virtual outcome::result<void> put(const K &key, V &&value) = 0;
30 
36  virtual outcome::result<void> remove(const K &key) = 0;
37  };
38 
39 } // namespace kagome::storage::face
40 
41 #endif // KAGOME_WRITEABLE_HPP
An mixin for modifiable map.
Definition: writeable.hpp:19
virtual outcome::result< void > put(const K &key, const V &value)=0
Store value by key.