barretenberg
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
MsgpackSchemaPacker Struct Reference

#include <schema_impl.hpp>

Inheritance diagram for MsgpackSchemaPacker:

Public Member Functions

 MsgpackSchemaPacker (msgpack::sbuffer &stream)
 
bool set_emitted (const std::string &type)
 
void pack_alias (const std::string &schema_name, const std::string &msgpack_name)
 
template<typename T >
void pack_schema (const T &obj)
 
template<typename... Args>
void pack_template_type (const std::string &schema_name)
 
template<msgpack_concepts::HasMsgPack T>
void pack_with_name (const std::string &type, T const &object)
 Encode a type that defines msgpack based on its key value pairs.
 

Public Attributes

std::set< std::string > emitted_types
 

Detailed Description

Define a serialization schema based on compile-time information about a type being serialized. This is then consumed by typescript to make bindings.

Member Function Documentation

◆ pack_alias()

void MsgpackSchemaPacker::pack_alias ( const std::string &  schema_name,
const std::string &  msgpack_name 
)
inline

Pack a type indicating it is an alias of a certain msgpack type Packs in the form ["alias", [schema_name, msgpack_name]]

Parameters
schema_nameThe CPP type.
msgpack_nameThe msgpack type.

◆ pack_schema()

template<typename T >
void MsgpackSchemaPacker::pack_schema ( const T &  obj)
inline

Pack the schema of a given object.

Template Parameters
Tthe object's type.
Parameters
objthe object.

◆ pack_with_name()

void MsgpackSchemaPacker::pack_with_name ( const std::string &  type,
T const &  object 
)
inline

Encode a type that defines msgpack based on its key value pairs.

Template Parameters
Tthe msgpack()'able type
Parameters
packerOur special packer.
objectThe object in question.

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