def next.body.exact
mylsm-lsm-store@0.6.0.1 · src/scan/ByteBlockReader.bend:1315
import mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend as ByteBlockReader
import Base
import mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend as ByteSstFile
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
1315def next.body.exact(
1316 context: BodyContext,
1317 pair: File & Result<&1, &1, U32 & String, Bytes.Bytes>
1318) -> IO(Result<&1, &1, U32 & String, Step>):
1319 match context:
1320 case BodyContext{state, block_header, +payload_length}:
1321 match pair:
1322 case (read_file, Fail{error}):
1323 close.failed(read_file, error)
1324 case (read_file, Done{body}):
1325 next.body.copies(read_file, state, payload_length,
1326 ByteSstFile.clone.split(Bytes.concat([block_header, body])))