SstFile.parse.records.go: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/SstFile.bend as SstFile Lines 813-839 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=813&end_line=839 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 def parse.records.go( remaining: Nat, decision: RecordDecision, +payload_left: U32, acc: List<&2, MemTable.Entry> ) -> Bytes.Cursor & Result<&1, &1, Error, ParsedEntries>: match remaining: case 0n: parse.records.empty(decision) case 1n++rest: match decision: case Rejected{cursor, error}: (cursor, Fail{error}) case OutOfBounds{cursor}: (cursor, Fail{Malformed{}}) case OutOfOrder{cursor}: (cursor, Fail{InvalidOrder{}}) case LastMalformed{cursor}: (cursor, Fail{Malformed{}}) case LastRecord{cursor, entry, +key}: (cursor, Done{Entries{Con{entry, acc}, Some{key}}}) case MoreRecords{cursor, entry, +key, +used}: +payload_after = (payload_left - used : U32) parse.records.go(rest, parse.records.decision(parse.record.read(cursor, payload_after, Some{key}, Nat.is_eq(rest, 1n))), payload_after, Con{entry, acc}) Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Cursor https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/MemTable.bend&name=Entry 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=RecordDecision https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/SstFile.bend&name=parse.record.read https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/SstFile.bend&name=parse.records.decision https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/SstFile.bend&name=parse.records.empty