def rows_of

cswap-bend-cli@0.1.0.0 · daemon/gather.bend:107

import cswap-bend-cli@0.1.0.0/daemon/gather.bend as Gather
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/fs.bend as Fs
import cswap-bend-cli@0.1.0.0/store/seq.bend as SSeq

107# The cached rows (accounts object); {} for a missing, torn or other-schema file.
108def rows_of(r: Fs.Res(String)) -> Json.Json:
109  match r:
110    case Fail{e}:
111      SSeq.accounts_of(Json.JNull{})
112    case Done{t}:
113      rows2(Json.parse(t))

Uses (7)

Used by (1)