Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
msgpack_impl.hpp File Reference

Go to the source code of this file.

Functions

std::pair< uint8_t *, size_t > msgpack_encode_buffer (auto &&obj, uint8_t *scratch_buf=nullptr, size_t scratch_size=0)
 

Function Documentation

◆ msgpack_encode_buffer()

std::pair< uint8_t *, size_t > msgpack_encode_buffer ( auto &&  obj,
uint8_t *  scratch_buf = nullptr,
size_t  scratch_size = 0 
)
inline

Represents this as a bbmalloc'ed object, fit for sending to e.g. TypeScript.

Parameters
objThe object.
scratch_bufOptional pre-allocated scratch buffer to use if result fits.
scratch_sizeSize of the scratch buffer.
Returns
The buffer pointer/size pair. Returns scratch_buf if result fits, otherwise allocates new buffer.

Definition at line 24 of file msgpack_impl.hpp.