Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
serialize Namespace Reference

Functions

void read (auto &it, msgpack_concepts::HasMsgPack auto &obj)
 Automatically derived read for any object that defines .msgpack() (implicitly defined by MSGPACK_FIELDS).
 
void write (auto &buf, const msgpack_concepts::HasMsgPack auto &obj)
 Automatically derived write for any object that defines .msgpack() (implicitly defined by MSGPACK_FIELDS).
 
void read (uint8_t const *&it, uint8_t &value)
 
void write (uint8_t *&it, uint8_t value)
 
void read (uint8_t const *&it, bool &value)
 
void write (uint8_t *&it, bool value)
 
void read (uint8_t const *&it, uint16_t &value)
 
void write (uint8_t *&it, uint16_t value)
 
void read (uint8_t const *&it, uint32_t &value)
 
void write (uint8_t *&it, uint32_t value)
 
void read (uint8_t const *&it, uint64_t &value)
 
void write (uint8_t *&it, uint64_t value)
 
void read (uint8_t const *&it, uint128_t &value)
 
void write (uint8_t *&it, uint128_t value)
 
void read (std::vector< uint8_t > const &buf, std::integral auto &value)
 
void write (std::vector< uint8_t > &buf, const std::integral auto &value)
 
void read (std::istream &is, std::integral auto &value)
 
void write (std::ostream &os, const std::integral auto &value)
 
void _read_msgpack_field (auto &it, auto &field)
 Helper method for better error reporting. Clang does not give the best errors for "auto..." arguments.
 
void _write_msgpack_field (auto &it, const auto &field)
 Helper method for better error reporting. Clang does not give the best errors for "auto..." arguments.
 
template<typename T >
void _msgpack_stream_write (std::ostream &os, const std::shared_ptr< T > &field)
 Helper method for streaming msgpack values, specialized for shared_ptr.
 
void _msgpack_stream_write (std::ostream &os, const auto &field)
 Helper method for streaming msgpack values, normal case.
 
void _msgpack_stream_write_key_value_pairs (std::ostream &os)
 Recursive helper method for streaming msgpack key value pairs, base case.
 
void _msgpack_stream_write_key_value_pairs (std::ostream &os, const std::string &key, const auto &value, const auto &... rest)
 Recursive helper method for streaming msgpack key value pairs, default arg case.
 
void _msgpack_stream_write_key_value_pairs (std::ostream &os, const std::string &key, const msgpack_concepts::HasMsgPack auto &value, const auto &... rest)
 Recursive helper method for streaming msgpack key value pairs, msgpack arg case We add a new line as this was the previous output captured in snapshot tests. TODO(AD): Ideally some tab indenting?
 

Function Documentation

◆ _msgpack_stream_write() [1/2]

void serialize::_msgpack_stream_write ( std::ostream &  os,
const auto &  field 
)
inline

Helper method for streaming msgpack values, normal case.

Definition at line 29 of file streams.hpp.

◆ _msgpack_stream_write() [2/2]

template<typename T >
void serialize::_msgpack_stream_write ( std::ostream &  os,
const std::shared_ptr< T > &  field 
)

Helper method for streaming msgpack values, specialized for shared_ptr.

Definition at line 21 of file streams.hpp.

◆ _msgpack_stream_write_key_value_pairs() [1/3]

void serialize::_msgpack_stream_write_key_value_pairs ( std::ostream &  os)
inline

Recursive helper method for streaming msgpack key value pairs, base case.

Definition at line 37 of file streams.hpp.

◆ _msgpack_stream_write_key_value_pairs() [2/3]

void serialize::_msgpack_stream_write_key_value_pairs ( std::ostream &  os,
const std::string &  key,
const auto &  value,
const auto &...  rest 
)
inline

Recursive helper method for streaming msgpack key value pairs, default arg case.

Definition at line 45 of file streams.hpp.

◆ _msgpack_stream_write_key_value_pairs() [3/3]

void serialize::_msgpack_stream_write_key_value_pairs ( std::ostream &  os,
const std::string &  key,
const msgpack_concepts::HasMsgPack auto &  value,
const auto &...  rest 
)
inline

Recursive helper method for streaming msgpack key value pairs, msgpack arg case We add a new line as this was the previous output captured in snapshot tests. TODO(AD): Ideally some tab indenting?

Definition at line 60 of file streams.hpp.

◆ _read_msgpack_field()

void serialize::_read_msgpack_field ( auto &  it,
auto &  field 
)
inline

Helper method for better error reporting. Clang does not give the best errors for "auto..." arguments.

Definition at line 505 of file serialize.hpp.

◆ _write_msgpack_field()

void serialize::_write_msgpack_field ( auto &  it,
const auto &  field 
)
inline

Helper method for better error reporting. Clang does not give the best errors for "auto..." arguments.

Definition at line 528 of file serialize.hpp.

◆ read() [1/9]

void serialize::read ( auto &  it,
msgpack_concepts::HasMsgPack auto &  obj 
)
inline

Automatically derived read for any object that defines .msgpack() (implicitly defined by MSGPACK_FIELDS).

Parameters
itThe iterator to read from.
funcThe function to call with each field as an argument.

Definition at line 516 of file serialize.hpp.

◆ read() [2/9]

void serialize::read ( std::istream &  is,
std::integral auto &  value 
)

Definition at line 170 of file serialize.hpp.

◆ read() [3/9]

void serialize::read ( std::vector< uint8_t > const &  buf,
std::integral auto &  value 
)

Definition at line 156 of file serialize.hpp.

◆ read() [4/9]

void serialize::read ( uint8_t const *&  it,
bool &  value 
)
inline

Definition at line 76 of file serialize.hpp.

◆ read() [5/9]

void serialize::read ( uint8_t const *&  it,
uint128_t value 
)
inline

Definition at line 139 of file serialize.hpp.

◆ read() [6/9]

void serialize::read ( uint8_t const *&  it,
uint16_t &  value 
)
inline

Definition at line 88 of file serialize.hpp.

◆ read() [7/9]

void serialize::read ( uint8_t const *&  it,
uint32_t &  value 
)
inline

Definition at line 100 of file serialize.hpp.

◆ read() [8/9]

void serialize::read ( uint8_t const *&  it,
uint64_t &  value 
)
inline

Definition at line 112 of file serialize.hpp.

◆ read() [9/9]

void serialize::read ( uint8_t const *&  it,
uint8_t &  value 
)
inline

Definition at line 64 of file serialize.hpp.

◆ write() [1/9]

void serialize::write ( auto &  buf,
const msgpack_concepts::HasMsgPack auto &  obj 
)
inline

Automatically derived write for any object that defines .msgpack() (implicitly defined by MSGPACK_FIELDS).

Parameters
bufThe buffer to write to.
objThe object to write.

Definition at line 538 of file serialize.hpp.

◆ write() [2/9]

void serialize::write ( std::ostream &  os,
const std::integral auto &  value 
)

Definition at line 178 of file serialize.hpp.

◆ write() [3/9]

void serialize::write ( std::vector< uint8_t > &  buf,
const std::integral auto &  value 
)

Definition at line 162 of file serialize.hpp.

◆ write() [4/9]

void serialize::write ( uint8_t *&  it,
bool  value 
)
inline

Definition at line 82 of file serialize.hpp.

◆ write() [5/9]

void serialize::write ( uint8_t *&  it,
uint128_t  value 
)
inline

Definition at line 146 of file serialize.hpp.

◆ write() [6/9]

void serialize::write ( uint8_t *&  it,
uint16_t  value 
)
inline

Definition at line 94 of file serialize.hpp.

◆ write() [7/9]

void serialize::write ( uint8_t *&  it,
uint32_t  value 
)
inline

Definition at line 106 of file serialize.hpp.

◆ write() [8/9]

void serialize::write ( uint8_t *&  it,
uint64_t  value 
)
inline

Definition at line 118 of file serialize.hpp.

◆ write() [9/9]

void serialize::write ( uint8_t *&  it,
uint8_t  value 
)
inline

Definition at line 70 of file serialize.hpp.