Module encode

Module encode 

Source
Expand description

This module provides custom traits Encode and Decode for (de)serialization from/to msgpack and corresponding encode, [’decode] functions, which use the traits with default configuration options.

The traits are implemented for several common types, for other types they can be easily derived. See trait documentation for more.

Structs§

Context
Additional parameters that influence (de)serializetion through Encode and [‘Decode’].
DecodeError
EncodeError
ExtStruct
ExtStruct for serialization and deserialization MessagePack extension type

Enums§

StructStyle
Defines the (de)serialization style for structs. NOTE: switching context on tuple structs to ForceAsMap will be silently ignored and forced as MP_ARRAY.

Traits§

Decode
A general purpose trait for msgpack deserialization. Reads self from a reader supplied in r.
Encode
A general purpose trait for msgpack serialization. Writes self to writer supplied in w.

Functions§

decode
Decodes T from a slice of bytes in msgpack.
encode
Encodes value as a vector of bytes in msgpack.

Derive Macros§

Decode
Macro to automatically derive tarantool::msgpack::Decode Deriving this trait will allow decoding this struct from msgpack format. It is meant as a replacement for serde + rmp_serde allowing us to customize it for tarantool case and hopefully also decreasing compile-time due to its simplicity.
Encode
Macro to automatically derive tarantool::msgpack::Encode Deriving this trait will make this struct encodable into msgpack format. It is meant as a replacement for serde + rmp_serde allowing us to customize it for tarantool case and hopefully also decreasing compile-time due to its simplicity.