def decode.words.payload_length.size.copies
mylsm-lsm-store@0.6.0.1 · src/coordinator/Protocol.bend:279
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
279def decode.words.payload_length.size.copies(
280 input: Bytes.Bytes,
281 +version: U32,
282 +generation: U32,
283 +request_id: U32,
284 +operation: U32,
285 +payload_length: U32,
286 exact_expected: Nat,
287 short_expected: Nat,
288 within_limit: Bool,
289 sizes: Nat & Nat
290) -> FrameDecision:
291 match sizes:
292 case (exact_size, short_size):
293 decode.sized(input, version, generation, request_id, operation,
294 payload_length,
295 Nat.is_eq(exact_size, exact_expected),
296 Nat.is_lt(short_size, short_expected), within_limit)