Codec.encode: def of bend-kit-postgres@0.3.0.0 Import: import bend-kit-postgres@0.3.0.0/codec.bend as Codec Lines 179-205 of bend-kit-postgres@0.3.0.0/codec.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&start_line=179&end_line=205 import Base import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes # The wire bytes of a frontend message. def encode(m: Front) -> Bytes.Bytes: match m: case Startup{ps}: packet(Bytes.concat(Con{be32(196608), params.enc(ps)})) case SSLRequest{}: packet(be32(80877103)) case Password{t}: frame(112, cstr.enc(t)) case SASLInitial{mech, d}: frame(112, Bytes.append(cstr.enc(mech), value(Some{d}))) case SASLResponse{d}: frame(112, d) case Parse{n, q, oids}: frame(80, Bytes.concat([cstr.enc(n), cstr.enc(q), n16(be32s(oids))])) case Bind{p, s, fs, ps, rs}: frame(66, Bytes.concat([cstr.enc(p), cstr.enc(s), n16(be16s(fs)), n16(values(ps)), n16(be16s(rs))])) case Describe{+k, n}: frame(68, Bytes.append(byte1(k), cstr.enc(n))) case Execute{p, +max}: frame(69, Bytes.append(cstr.enc(p), be32(max))) case Sync{}: frame(83, Bytes.new(0)) case CloseMsg{+k, n}: frame(67, Bytes.append(byte1(k), cstr.enc(n))) case Terminate{}: frame(88, Bytes.new(0)) Uses (18): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=append https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=concat https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=new https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=Front https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=be16s https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=be32 https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=be32s https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=byte1 https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=cstr.enc https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=frame https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=n16 https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=packet https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=params.enc https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=value https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=values