def decode.words.payload_length.admitted

mylsm-lsm-store@0.6.0.1 · src/coordinator/Protocol.bend:330

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

330# Rejects oversized declarations before computing or comparing frame offsets.
331def decode.words.payload_length.admitted(
332  input: Bytes.Bytes,
333  +size: U32,
334  +version: U32,
335  +generation: U32,
336  +request_id: U32,
337  +operation: U32,
338  +payload_length: U32,
339  exact_length: U32,
340  within_limit: Bool
341) -> FrameDecision:
342  match within_limit:
343    case False{}: FrameTooLarge{}
344    case True{}:
345      decode.words.payload_length.expected(input, size, version, generation,
346        request_id, operation, payload_length,
347        Nat.add(24n, U32.to_nat(exact_length)), True{})

Uses (7)

Used by (1)