def field.length
import mylsm-lsm-store@0.6.0.1/src/coordinator/CursorOpenCodec.bend as CursorOpenCodecimport Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
167# Checks that one field's four-byte length is available at its offset.
168def field.length(
169 payload: Bytes.Bytes,
170 total: U32,
171 offset: U32,
172 parsed: Maybe<&2, U32>
173) -> BoundResult:
174 match parsed:
175 case None{}: BoundMalformed{}
176 case Some{length}:
177 field.value(payload, total, offset, length)