20 : packer<
msgpack::sbuffer>(stream)
40 void pack_alias(
const std::string& schema_name,
const std::string& msgpack_name)
65 pack_array(
sizeof...(Args));
78 template <msgpack_concepts::HasMsgPack T>
void pack_with_name(
const std::string& type, T
const&
object)
86 const_cast<T&
>(object).
msgpack([&](
auto&... args) {
87 size_t kv_size =
sizeof...(args);
89 pack_map(uint32_t(1 + kv_size / 2));
110template <
typename Value,
typename... Rest>
118 "see the first type argument in the error trace, it might require a specialization of msgpack_schema_pack");
136template <msgpack_concepts::HasMsgPackSchema T>
139 obj.msgpack_schema(packer);
149template <msgpack_concepts::HasMsgPack T>
163 "see the first type argument in the error trace, it might need a msgpack_schema method!");
198template <
typename T, std::
size_t N>
202 packer.pack_array(2);
203 packer.pack(
"array");
205 packer.pack_array(2);
220 msgpack::sbuffer output;
223 msgpack::object_handle oh = msgpack::unpack(output.data(), output.size());
224 std::stringstream pretty_output;
226 return pretty_output.str();
std::string msgpack_schema_name(bb::g1::affine_element const &)
void check_msgpack_usage(const auto &object)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
void _msgpack_schema_pack(MsgpackSchemaPacker &packer, const T &obj)
Helper method for better error reporting. Clang does not give the best errors for argument lists.
void msgpack_schema_pack(MsgpackSchemaPacker &packer, T const &obj)
void _schema_pack_map_content(MsgpackSchemaPacker &)
std::string msgpack_schema_to_string(const auto &obj)
Print's an object's derived msgpack schema as a string.
void pack_alias(const std::string &schema_name, const std::string &msgpack_name)
bool set_emitted(const std::string &type)
void pack_with_name(const std::string &type, T const &object)
Encode a type that defines msgpack based on its key value pairs.
MsgpackSchemaPacker(msgpack::sbuffer &stream)
std::set< std::string > emitted_types
void pack_template_type(const std::string &schema_name)
void pack_schema(const T &obj)