rmp-serde-0.15.1 has been yanked.
This crate connects Rust MessagePack library with serde
providing an ability to
easily serialize and deserialize both Rust built-in types, the standard library and custom data
structures.
Motivating example
let buf = to_vec.unwrap;
assert_eq!;
assert_eq!;
Type-based Serialization and Deserialization
Serde provides a mechanism for low boilerplate serialization & deserialization of values to and from MessagePack via the serialization API.
To be able to serialize a piece of data, it must implement the serde::Serialize
trait. To be
able to deserialize a piece of data, it must implement the serde::Deserialize
trait. Serde
provides an annotation to automatically generate the code for these
traits: #[derive(Serialize, Deserialize)]
.
Examples
extern crate serde;
extern crate serde_derive;
extern crate rmp_serde as rmps;
use HashMap;
use ;
use ;