Kagome
Polkadot Runtime Engine in C++17
messages.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_MESSAGES_MESSAGES_HPP
7 #define KAGOME_MESSAGES_MESSAGES_HPP
8 
9 #include <boost/system/error_code.hpp>
10 #include <functional>
11 #include <gsl/span>
12 #include <memory>
13 
15 #include "network/protobuf/api.v1.pb.h"
16 #include "outcome/outcome.hpp"
17 
18 namespace kagome::network {
19 
20  template <typename T, typename RW>
21  struct Message {
22  using ReadWriter = RW;
23  T data;
24  };
25 
26  template <typename... T>
28  std::tuple<T...> msgs;
29 
30  template <typename Q>
31  MessagesSequence(Q &&...args) : msgs{std::forward<Q>(args)...} {}
32  };
33 
34 } // namespace kagome::network
35 
36 #endif // KAGOME_MESSAGES_MESSAGES_HPP