Go to the source code of this file.
|
| std::pair< uint8_t *, size_t > | msgpack_encode_buffer (auto &&obj, uint8_t *scratch_buf=nullptr, size_t scratch_size=0) |
| |
| void | msgpack_cbind_impl (const auto &func, const uint8_t *input_in, size_t input_len_in, uint8_t **output_out, size_t *output_len_out) |
| |
| void | msgpack_cbind_schema_impl (auto func, uint8_t **output_out, size_t *output_len_out) |
| |
◆ CBIND
| #define CBIND |
( |
|
cname, |
|
|
|
func |
|
) |
| |
Value:
WASM_EXPORT void cname##__schema(uint8_t** output_out,
size_t* output_len_out) \
{ \
msgpack_cbind_schema_impl(func, output_out, output_len_out); \
}
#define CBIND_NOSCHEMA(cname, func)
Definition at line 108 of file msgpack_impl.hpp.
◆ CBIND_NOSCHEMA
| #define CBIND_NOSCHEMA |
( |
|
cname, |
|
|
|
func |
|
) |
| |
Value: WASM_EXPORT void cname(
const uint8_t* input_in,
size_t input_len_in, uint8_t** output_out,
size_t* output_len_out) \
{ \
msgpack_cbind_impl(func, input_in, input_len_in, output_out, output_len_out); \
}
Definition at line 97 of file msgpack_impl.hpp.
◆ msgpack_cbind_impl()
| void msgpack_cbind_impl |
( |
const auto & |
func, |
|
|
const uint8_t * |
input_in, |
|
|
size_t |
input_len_in, |
|
|
uint8_t ** |
output_out, |
|
|
size_t * |
output_len_out |
|
) |
| |
|
inline |
◆ msgpack_cbind_schema_impl()
| void msgpack_cbind_schema_impl |
( |
auto |
func, |
|
|
uint8_t ** |
output_out, |
|
|
size_t * |
output_len_out |
|
) |
| |
|
inline |
◆ 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
-
| obj | The object. |
| scratch_buf | Optional pre-allocated scratch buffer to use if result fits. |
| scratch_size | Size of the scratch buffer. |
- Returns
- The buffer pointer/size pair. Returns scratch_buf if result fits, otherwise allocates new buffer.
Definition at line 28 of file msgpack_impl.hpp.