def replaced

mylsm-lsm-store@0.6.0.1 · src/scan/VisibleStats.bend:29

import mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend as VisibleStats
import Base

29# Replaces a value without changing the visible key count.
30def replaced(current: Stats, old_bytes: Nat, new_bytes: Nat) -> Decision:
31  match current:
32    case Stats{entries, payload_bytes}:
33      Applied{Stats{entries, Nat.add(Nat.sub(payload_bytes, old_bytes), new_bytes)}}

Uses (5)

Used by (1)