Expand description
Time and space efficient binary serialization for types that are stored in a contract’s storage. Supports both structs and enums, with or without generics. This is Fadroma’s default mode for serializing data for storage.
Modules
Structs
- Used to encode the number of items that a sequence type (such as
String::len
or aVec::len
) has. This allows us to represent that length with as few bytes as possible while allowing it to be dynamic.
Enums
Traits
- A type that knows how to create an instance of itself given a stream of raw bytes. Can be derived.
- A type that knows how to serialize itself to bytes. Can be derived.
- Extension trait for conveniently serializing types that implement
FadromaSerialize
into bytes.