ByteWal.measure.lookup.loop: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/ByteWal.bend as ByteWal Lines 680-712 of mylsm-lsm-store@0.6.0.1/src/ByteWal.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&start_line=680&end_line=712 import Base import mylsm-lsm-store@0.6.0.1/src/Wal.bend as Wal def measure.lookup.loop(fuel: Nat, state: MeasureState) -> Result<&1, &1, Wal.Error, ValueMetadata>: match fuel: case 0n: Fail{Wal.Malformed{}} case 1n+rest: match state: case MeasureNext{frame, offset, remaining, progress}: match remaining: case 0n: measure.lookup.finish(progress, offset) case 1n+more: measure.lookup.loop(rest, MeasureRead{more, progress, record.measure.retained(frame, offset)}) case MeasureRead{remaining, progress, measured}: measure.lookup.loop(rest, measure.lookup.read(remaining, progress, measured)) case MeasureCompared{frame, next_offset, remaining, progress, record_has_value, record_value_bytes, order}: match progress: case MeasureProgress{query, records_end, found, has_value, value_bytes}: match order: case EQ{}: measure.lookup.loop(rest, MeasureNext{frame, next_offset, remaining, MeasureProgress{query, records_end, True{}, record_has_value, record_value_bytes}}) case _: measure.lookup.loop(rest, MeasureNext{frame, next_offset, remaining, MeasureProgress{query, records_end, found, has_value, value_bytes}}) case MeasureFailed{error}: Fail{error} Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Cmp 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=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&name=MeasureProgress https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&name=MeasureState https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&name=ValueMetadata https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&name=measure.lookup.finish https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&name=measure.lookup.read https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&name=record.measure.retained https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/Wal.bend&name=Error