def reserve.result

mylsm-lsm-store@0.6.0.1 · src/scan/Snapshot.bend:266

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

266# Produces the updated reservation only when both bounds admit it.
267def reserve.result(
268  count: Nat,
269  retained_bytes: Nat,
270  admitted: Bool & Bool
271) -> Decision:
272  match admitted:
273    case (True{}, True{}):
274      Retained{Nat.add(count, 1n), retained_bytes}
275    case _:
276      ResourceLimit{}

Uses (6)

Used by (1)