VisibleStats.apply: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend as VisibleStats Lines 35-50 of mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend&start_line=35&end_line=50 import Base # Applies the visible effect of one key's before and after states. def apply( current: Stats, key_bytes: Nat, before: Maybe<&1, Nat>, after: Maybe<&1, Nat> ) -> Decision: match before: case None{}: match after: case None{}: unchanged(current) case Some{new_bytes}: added(current, key_bytes, new_bytes) case Some{old_bytes}: match after: case None{}: removed(current, key_bytes, old_bytes) case Some{new_bytes}: replaced(current, old_bytes, new_bytes) Uses (8): 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=mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend&name=Decision 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=added https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend&name=removed https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend&name=replaced https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend&name=unchanged