def with_pace

cswap-bend-cli@0.1.0.0 · view.bend:170

import cswap-bend-cli@0.1.0.0/view.bend as View
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json

170def with_pace(j: Json.Json, m: Maybe<&2, Pace>) -> Json.Json:
171  match m:
172    case None{}:
173      j
174    case Some{Pace{e, a, eta, last}}:
175      put_m("willLastToReset", last.json(last),
176        put_m("projectedExhaustionAt", eta.m(eta),
177          put("aheadOfPace", jbool(a), put("expectedPct", Json.JNum{tenths_text(e)}, j))))

Uses (9)

Used by (1)