pub(super) trait FixedSizeEncoding: Default {
    type ByteArray;

    fn from_bytes(b: &Self::ByteArray) -> Self;
    fn write_to_bytes(self, b: &mut Self::ByteArray);
}
Expand description

Helper trait, for encoding to, and decoding from, a fixed number of bytes. Used mainly for Lazy positions and lengths. Unchecked invariant: Self::default() should encode as [0; BYTE_LEN], but this has no impact on safety.

Required Associated Types

This should be [u8; BYTE_LEN];

Required Methods

Implementations on Foreign Types

Implementors