Serialization and deserialization layer specialized for binary encoding.
Ensures consistency and safety. Basically a minimal subset or
rustc_serialize customized for our need.
Eliminate some of the boilerplate of deserialization (package ser) by
passing just the list of reader function (with optional single param)
Example before:
let foo = reader.read_u64()?;
let bar = reader.read_u32()?;
let fixed_byte_var = reader.read_fixed_bytes(64)?;
Example after:
let (foo, bar, fixed_byte_var) = ser_multiread!(reader, read_u64,
read_u32, read_fixed_bytes(64));
Eliminate some of the boilerplate of serialization (package ser) by
passing directly pairs of writer function and data to write.
Example before:
reader.write_u64(42)?;
reader.write_u32(100)?;
Example after:
ser_multiwrite!(writer, [write_u64, 42], [write_u32, 100]);
Allows the conversion of an expression that doesn’t return anything to one
that returns the provided identifier.
Example:
let foo = vec![1,2,3]
println!(tee!(foo, foo.append(vec![3,4,5]))