def next.body.output.order

mylsm-lsm-store@0.6.0.1 · src/scan/ByteBlockReader.bend:1213

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/ByteMemTable.bend as ByteMemTable
import mylsm-lsm-store@0.6.0.1/src/scan/BlockOrder.bend as BlockOrder
import mylsm-lsm-store@0.6.0.1/src/hub_sha/sha256.bend as SHA
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

1213def next.body.output.order(
1214  file: File,
1215  +size: Nat,
1216  header: Bytes.Bytes,
1217  +index_offset: Nat,
1218  +used: Nat,
1219  total: U32,
1220  block_count: U32,
1221  next_block: U32,
1222  decoded: U32,
1223  root_hash: SHA.Stream,
1224  index_hash: SHA.Stream,
1225  block_bytes: Bytes.Bytes,
1226  +payload_length: U32,
1227  raw_count: Nat,
1228  entries: List<&1, ByteMemTable.Entry>,
1229  order: BlockOrder.State,
1230  selected: Bool
1231) -> IO(Result<&1, &1, U32 & String, Step>):
1232  match order:
1233    case BlockOrder.State{valid, last_key, +count}:
1234      next.body.output.count(file, size, header, index_offset, used, total,
1235        block_count, next_block, decoded,
1236        root_hash, index_hash,
1237        block_bytes, payload_length, U32.from_nat(count), entries, last_key,
1238        valid && Nat.is_eq(raw_count, count), selected)

Uses (18)

Used by (1)