Expand description
A library for reading and writing MSD files.
Usage
Reading and writing of MSD files is done using serde
, a library
for generic serialization and deserialization. It will work with any types that implement the
Serialize
and
Deserialize
traits.
Example
use std::collections::HashMap;
fn main() {
let mut map: HashMap<String, usize> = HashMap::new();
map.insert("foo".to_owned(), 1);
map.insert("bar".to_owned(), 2);
// Serialize the map into a byte buffer.
let serialized = msd::to_bytes(&map).unwrap();
// Deserialize back into a map again.
let deserialized = msd::from_bytes(&serialized).unwrap();
assert_eq!(map, deserialized);
}
Modules
Structs
Deserializes data from MSD format.
Serializes data into MSD format.
Functions
Deserialize a value of type T
from a slice of bytes.
Deserialize a value of type T
from the given reader
.
Serialize the given value
into a byte buffer.
Serialize the given value
into the given writer
in MSD format.