Module rocket::serde::msgpack

source ·
Available on crate feature msgpack only.
Expand description

Automatic MessagePack (de)serialization support.

See MsgPack for further details.

§Enabling

This module is only available when the msgpack feature is enabled. Enable it in Cargo.toml as follows:

[dependencies.rocket]
version = "0.5.1"
features = ["msgpack"]

§Testing

The LocalRequest and LocalResponse types provide msgpack() and into_msgpack() methods to create a request with serialized MessagePack and deserialize a response as MessagePack, respectively.

Structs§

  • The MessagePack guard: easily consume and return MessagePack.

Enums§

  • Enum representing errors that can occur while decoding MessagePack data.

Functions§

  • Deserialize an instance of type T from MessagePack encoded bytes.
  • Serialize a T into a MessagePack byte vector with compact representation.
  • Serialize a T into a MessagePack byte vector with named representation.