Expand description
This module exposes some utilities for working with SCALE bit sequences, namely:
- Encoding: see
encode_using_formatandencode_using_format_to. - Decoding: see
decode_using_format_from. - Talking about obtaining the format of said bit sequences: see the
formatmodule.
The Decoder enum can also return the expected number of bytes to be decoded
and the number of bits to be returned without actually decoding them.
Re-exports§
pub use format::Format;
Modules§
- format
- Types to describe the format of some SCALE encoded bits.
Structs§
- Decoder
- This is handed back from
decode_using_format_from, and can be used to obtain some information about, or iterate over, the SCALE encoded bit sequence, using theFormatgiven. Alternately, you can match on it to retrieve a decoder for the specific format, which may be more efficient.
Functions§
- decode_
using_ format_ from - SCALE decode a bit sequence using the given format, handing back an iterator of booleans.
- encode_
using_ format - This is a convenience wrapper around
encode_using_format_to. - encode_
using_ format_ to - SCALE encode an iterator of booleans with a known size into a bit sequence using the given format.