musli-zerocopy
Zero copy primitives for use in Müsli.
This provides a base set of tools to deal with types which do not require copying during deserialization.
Limits
Offset, the size of unsized values, and slice lengths are all limited to 32-bit, that is the longest unsized value that can be stored in 2**32 bytes.
Examples
use ;
let mut buf = new;
let string = buf.store_unsized?;
let c1 = buf.store?;
let c2 = buf.store?;
let mut map = Vecnew;
map.push;
map.push;
let map = buf.insert_map?;
let buf = buf.as_aligned;
let map = buf.bind?;
let c1 = buf.load?;
assert_eq!;
assert_eq!;
let c2 = buf.load?;
assert_eq!;
assert_eq!;
assert!;