def read.block.body.state

mylsm-lsm-store@0.6.0.1 · src/SstStreamIo.bend:243

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

243def read.block.body.state(
244  pair: File & Result<&1, &1, U32 & String, Bytes.Bytes>,
245  +size: Nat,
246  +used: Nat,
247  parser: SstFile.StreamState,
248  header: Bytes.Bytes,
249  +tail_len: U32
250) -> StreamReadState:
251  match pair:
252    case (file, Fail{error}):
253      ReadClose{file, Fail{error}}
254    case (file, Done{body}):
255      read.block.body.parsed(file, size, used, tail_len,
256        SstFile.stream.block(parser, Bytes.concat([header, body])))

Uses (14)

Used by (1)