Skip to main content

Module store

Module store 

Source
Expand description

How a value becomes the bytes in a record, and back (15 section 4).

There is no serialization here in the sense the word usually has. A u64 is eight bytes little endian, a string is its own bytes, and neither of them goes near a format that would have to be parsed. Nothing allocates on the way in, and the borrowed form on the way out does not allocate either.

What is missing is the part #[derive(Yo)] writes: a struct’s fields laid out in the order its shape declares. Until the derive lands, a collection holds the primitives, which is what Map<K, V> needs to be worth measuring.

Traits§

Decode
A type that can be read back out of a record.
Encode
A type that can be written into a record.