def parse.blocks.content.valid

mylsm-lsm-store@0.6.0.1 · src/SstFile.bend:1323

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

1323def parse.blocks.content.valid(
1324  cursor: Bytes.Cursor,
1325  +remaining: Nat,
1326  +entries_left: U32,
1327  entries: List<&2, MemTable.Entry>,
1328  hashes: List<&1, Bytes.Bytes>,
1329  +count: U32,
1330  records: ParsedEntries,
1331  digest: Bytes.Bytes,
1332  valid: Bool
1333) -> BlockDecision:
1334  match valid:
1335    case False{}:
1336      BlockOutOfBounds{}
1337    case True{}:
1338      parse.blocks.accumulate.records(cursor, remaining,
1339        (entries_left - count : U32), entries, digest <> hashes, records)

Uses (11)

Used by (1)