def item.header.checked
import mylsm-lsm-store@0.6.0.1/src/coordinator/CursorCodec.bend as CursorCodecimport Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
269# Routes complete item headers to the key-length decoder.
270def item.header.checked(
271 has_header: Bool,
272 payload: Bytes.Bytes,
273 size: U32
274) -> Decision:
275 match has_header:
276 case True{}:
277 item.header.read(Bytes.get.u32be(payload, 1), size)
278 case False{}: Malformed{}