ByteDurableDb.stats.visible: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as ByteDurableDb Lines 3160-3171 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=3160&end_line=3171 import Base import mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend as ByteMemTable import mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend as VisibleStats import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes def stats.visible( entries: List<&1, ByteMemTable.Entry>, current: VisibleStats.Stats ) -> VisibleStats.Stats: match entries: case Nil{}: current case Con{ByteMemTable.Entry{Bytes.Bytes{+len, _}, val}, tail}: match val: case None{}: stats.visible(tail, current) case Some{Bytes.Bytes{+value_len, _}}: stats.visible(tail, VisibleStats.result(VisibleStats.apply(current, U32.to_nat(len), None{}, Some{U32.to_nat(value_len)}))) Uses (8): 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=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/ByteMemTable.bend&name=Entry https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend&name=Stats https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend&name=apply https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend&name=result