def Reply.of
bend-kube-runtime@0.2.0.0 · src/client.bend:326
import bend-kube-runtime@0.2.0.0/src/client.bend as Client
import Base
import bend-kube-runtime@0.2.0.0/src/utf8.bend as U
import bend-kube-runtime@0.2.0.0/src/http.bend as H
326def Reply.of(r: H.Resp & List<&2, U32>) -> Result<&2, &2, KErr, Reply>:
327 match r:
328 case (H.Resp{H.PDone{}, Some{H.Head{c, reason, hs}}, o}, body):
329 Done{Reply{c, U.Utf8.decode_all(body)}}
330 case (H.Resp{H.PErr{m}, h, o}, body):
331 Fail{KNet{0, m}}
332 case (H.Resp{H.PLost{m}, h, o}, body):
333 Fail{KNet{0, m}}
334 case _:
335 Fail{KNet{0, "incomplete response"}}