SstFile.stream.block.valid: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/SstFile.bend as SstFile Lines 1474-1486 of mylsm-lsm-store@0.6.0.1/src/SstFile.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/SstFile.bend&start_line=1474&end_line=1486 import Base import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes def stream.block.valid( state: StreamState, records: ParsedEntries, +count: U32, digest: Bytes.Bytes, exact: Bool ) -> Result<&1, &1, Error, StreamState>: match state: case StreamState{+level, +total, +block_count, +remaining, +entries_left, _, entries, hashes}: stream.block.count(level, total, block_count, remaining, entries_left, entries, hashes, records, count, digest, exact && U32.is_le(count, entries_left) && parse.blocks.count.valid(U32.to_nat(remaining), entries_left, count)) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/SstFile.bend&name=Error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/SstFile.bend&name=ParsedEntries https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/SstFile.bend&name=StreamState https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/SstFile.bend&name=parse.blocks.count.valid https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/SstFile.bend&name=stream.block.count