Kagome
Polkadot Runtime Engine in C++17
module_factory.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CORE_RUNTIME_MODULE_FACTORY_HPP
7 #define KAGOME_CORE_RUNTIME_MODULE_FACTORY_HPP
8 
9 #include <gsl/span>
10 
11 #include "outcome/outcome.hpp"
13 #include "storage/trie/types.hpp"
14 
15 namespace kagome::runtime {
16 
17  class Module;
18 
19  class ModuleFactory {
20  public:
21  virtual ~ModuleFactory() = default;
22 
23  virtual outcome::result<std::unique_ptr<Module>> make(
24  gsl::span<const uint8_t> code) const = 0;
25  };
26 
27 } // namespace kagome::runtime
28 
29 #endif // KAGOME_CORE_RUNTIME_MODULE_FACTORY_HPP
virtual ~ModuleFactory()=default
virtual outcome::result< std::unique_ptr< Module > > make(gsl::span< const uint8_t > code) const =0