def header.length

mylsm-lsm-store@0.6.0.1 · src/coordinator/Io.bend:540

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

540def header.length(
541  file: File,
542  bytes: Bytes.Bytes,
543  length: Maybe<&2, U32>,
544  max_payload: Nat
545) -> IO(File & Result<&1, &1, Error, Protocol.Request>):
546  match length:
547    case Some{length}: payload.header(file, bytes, length, max_payload)
548    case None{}:
549      IO.pure(File & Result<&1, &1, Error, Protocol.Request>,
550        (file, Fail{Malformed{}}))

Uses (13)

Used by (1)