def decode.payload.inputs

mylsm-lsm-store@0.6.0.1 · src/coordinator/CursorOpenCodec.bend:380

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

380# Decodes an owner token followed by one supported cursor-open mode.
381def decode.payload.inputs(
382  payload: Bytes.Bytes,
383  totals: U32 & U32,
384  parsed: Maybe<&2, U32>
385) -> Decision:
386  match totals:
387    case (mode_total, check_total):
388      match parsed:
389        case Some{snapshot_id}:
390          mode.read(payload, snapshot_id, mode_total,
391            U32.is_le(8, check_total))
392        case None{}: Malformed{}

Uses (8)

Used by (1)