def decode.size.checked

mylsm-lsm-store@0.6.0.1 · src/coordinator/CursorCodec.bend:359

import mylsm-lsm-store@0.6.0.1/src/coordinator/CursorCodec.bend as CursorCodec
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

359# Decodes a complete cursor response, rejecting unknown tags and trailing data.
360def decode.size.checked(
361  payload: Bytes.Bytes,
362  sizes: U32 & U32
363) -> Decision:
364  match sizes:
365    case (checked_size, retained_size):
366      decode.nonempty(payload, retained_size, U32.is_le(1, checked_size))

Uses (7)

Used by (1)