def item.key.parsed
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
243# Accepts the key-length field only when all required bytes are present.
244def item.key.parsed(
245 payload: Bytes.Bytes,
246 size: U32,
247 parsed: Maybe<&2, U32>
248) -> Decision:
249 match parsed:
250 case Some{key_length}: item.key.bound(payload, size, key_length)
251 case None{}: Malformed{}