def prof_of_reply

cswap-bend-cli@0.1.0.0 · store.bend:40

import cswap-bend-cli@0.1.0.0/store.bend as Store
import Base
import cswap-bend-cli@0.1.0.0/http.bend as Http
import cswap-bend-cli@0.1.0.0/store/plan.bend as SPlan

40def prof_of_reply(r: Result<&2, &2, String, Http.Reply>) -> SPlan.Prof:
41  match r:
42    case Fail{e}:
43      SPlan.ProfNone{}
44    case Done{Http.Reply{status, head, body}}:
45      prof_if_ok(U32.is_eq(status, 200), body)

Uses (6)

Used by (1)