Expand description
src/headers/encode.rs
Header encoding utilities.
Design notes:
- Serializes
HeaderV1into a fixed 80‑byte buffer in little‑endian order. - Field order must match
types.rslayout exactly for ABI stability. - Validation is performed before encoding to fail fast on invalid headers.
- Returns a fixed
[u8; HEADER_LEN_V1]buffer on success.
Functions§
- encode_
header_ le - Serialize a
HeaderV1into an 80‑byte buffer in little‑endian order.