Expand description
Derive macros for lencode encoding/decoding traits.
#[derive(Encode)]implementslencode::Encodeby writing fields in declaration order and encoding enum discriminants compactly.#[derive(Decode)]implementslencode::Decodeto read the same layout.#[derive(Pack)]implementslencode::pack::Packby packing/unpacking fields in declaration order. For#[repr(transparent)]single‑field structs, it additionally generates bulkpack_slice/unpack_vecoverrides that transmute to/from the inner type’s slice/vec, enabling zero‑copy bulk I/O for newtypes over byte arrays.
For C‑like enums with an explicit #[repr(uN/iN)], the numeric value of the discriminant
is preserved; otherwise, the variant index is used.