def Ty.opt

bend-kube-runtime@0.2.0.0 · src/typed.bend:108

import bend-kube-runtime@0.2.0.0/src/typed.bend as Typed
import Base
import bend-kube-runtime@0.2.0.0/src/json.bend as J

108# An optional field: None when absent or null.
109def Ty.opt(~A: Data, ~dec: J.Json -> String -> Result<&2, &2, String, A>, +j: J.Json, +key: String,
110  +path: String) -> Result<&2, &2, String, Maybe<&2, A>>:
111  Ty.opt.go(~A, ~dec, J.Json.get(j, key), Ty.at(path, key), J.Json.is_null(J.Json.get(j, key)))

Uses (8)

Used by (0)

No other definition uses this definition.