Crate darkfi_serial
source ·Modules
Macros
- Encode a dynamic set of arguments to a buffer.
- Asynchronously encode a dynamic set of arguments to a buffer.
Structs
- Variable-integer encoding. Integer can be encoded depending on the represented value to save space. Variable length integers always precede an array/vector of a type of data that may vary in length. Longer numbers are encoded in little endian.
Traits
- Data which can asynchronously be decoded in a consensus-consistent way.
- Data which can asynchronously be encoded in a consensus-consistent way.
- Read bytes asynchronously.
- Write bytes asynchronously.
- Data which can be decoded in a consensus-consistent way.
- Data which can be encoded in a consensus-consistent way.
- Extensions of
Read
to decode data as per Bitcoin consensus. - Extensions of
Write
to encode data as per Bitcoin consensus.
Functions
- Deserialize an object from a vector. Will error if said deserialization doesn’t consume the entire vector.
- Asynchronously deserialize an object from a vector. Will error if said deserialization doesn’t consume the entire vector.
- Asynchronously deserialize an object from a vector, but do not error if the entire vector is not consumed.
- Deserialize an object from a vector, but do not error if the entire vector is not consumed.
- Encode an object into a vector.
- Asynchronously encode an object into a vector.