def value

bend-kit-postgres@0.3.0.0 · codec.bend:136

import bend-kit-postgres@0.3.0.0/codec.bend as Codec
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

136# An int32 length then the bytes; -1 and nothing for NULL.
137def value(m: Maybe<&1, Bytes.Bytes>) -> Bytes.Bytes:
138  match m:
139    case None{}:
140      be32(4294967295)
141    case Some{b}:
142      value.of(Bytes.length(b))

Uses (5)

Used by (2)