ByteDurableDb.snapshot.root.get.loop: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as ByteDurableDb Lines 2934-2964 of mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&start_line=2934&end_line=2964 import Base import mylsm-lsm-store@0.6.0.1/src/scan/VisibleCursor.bend as VisibleCursor import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes def snapshot.root.get.loop( fuel: Nat, state: SnapshotPointRead ) -> IO(Result<&1, &1, Error, Maybe<&1, Bytes.Bytes>>): match fuel: case 0n: match state: case SnapshotPointNeed{cursor, _}: snapshot.root.get.exhausted(cursor) case SnapshotPointStep{step, query}: snapshot.root.get.exhausted.step(query, step) case 1n+rest: match state: case SnapshotPointNeed{cursor, query}: do IO>>: step : VisibleCursor.Step <- VisibleCursor.next(cursor) snapshot.root.get.loop(rest, snapshot.root.get.step(query, step)) case SnapshotPointStep{step, query}: match step: case VisibleCursor.Item{entry, cursor}: snapshot.root.get.item(entry, cursor, query) case VisibleCursor.Skip{cursor}: snapshot.root.get.loop(rest, SnapshotPointNeed{cursor, query}) case VisibleCursor.End{}: IO.pure(Result<&1, &1, Error, Maybe<&1, Bytes.Bytes>>, Done{None{}}) case VisibleCursor.Error{(code, message)}: IO.pure(Result<&1, &1, Error, Maybe<&1, Bytes.Bytes>>, Fail{recovery.error(code, message)}) Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure 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=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma 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/ByteDurableDb.bend&name=Error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=SnapshotPointRead https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=recovery.error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=snapshot.root.get.exhausted https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=snapshot.root.get.exhausted.step https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=snapshot.root.get.item https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=snapshot.root.get.step https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/VisibleCursor.bend&name=Step https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/VisibleCursor.bend&name=next