Module codec

Source
Expand description

Core traits for encoding and decoding.

Traitsยง

Codec
Convenience trait combining Encode and Decode<Cfg>.
Config
Marker trait for types that can be used as configuration during decoding.
Decode
Trait combining Read<Cfg> with a check for remaining bytes.
Encode
Trait combining Write and EncodeSize for types that can be fully encoded.
EncodeFixed
Convenience trait for FixedSize types that can be encoded directly into a fixed-size array.
EncodeSize
Trait for types that can provide their encoded size in bytes.
FixedSize
Trait for types with a known, fixed encoded size.
RangeConfig
A marker trait for a Config type that is also a RangeBounds<usize>.
Read
Trait for types that can be read (decoded) from a byte buffer.
Write
Trait for types that can be written (encoded) to a byte buffer.