def cursor.step

mylsm-lsm-store@0.6.0.1 · src/coordinator/StatsCodec.bend:154

import mylsm-lsm-store@0.6.0.1/src/coordinator/StatsCodec.bend as StatsCodec
import Base

154def cursor.step(
155  entries: Nat,
156  payload_bytes: Nat,
157  snapshots: Nat,
158  retained_bytes: Nat,
159  cursors: Nat,
160  scalar: U32,
161  is_digit: Bool
162) -> State:
163  match is_digit:
164    case True{}:
165      CursorDigits{entries, payload_bytes, snapshots, retained_bytes,
166        Nat.add(Nat.mul(cursors, 10n), digit.value(scalar)), True{}}
167    case False{}: Invalid{}

Uses (7)

Used by (1)