Crate scale_bits
source · [−]Expand description
This crate provides the Bits
type; a drop-in, SCALE-compatible replacement for BitVec<u8, Lsb0>
which can also be encoded-to and decoded-from
various store and order types at runtime (Lsb0
and Msb0
orderings, and u8
, u16
and u32
store types), allowing for dynamic encoding and
decoding based on scale-info
metadata.
Modules
Ths module allows Bits
to be dynamically encoded and decoded into/from a given
Format
. The Format
can either be provided manually, or extracted from
scale_info
type information.
Macros
Structs
This represents a sequence of bits (normally expressed as a sequence of boolean values).
Internally it packs these bits into u8
s to minimise the space needed to store them.