Codec.encode.back: def of bend-kit-postgres@0.3.0.0 Import: import bend-kit-postgres@0.3.0.0/codec.bend as Codec Lines 210-254 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=210&end_line=254 import Base import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes # The wire bytes of a backend message, as a server sends it. def encode.back(m: Back) -> Bytes.Bytes: match m: case AuthOk{}: auth.enc(0, Bytes.new(0)) case AuthCleartext{}: auth.enc(3, Bytes.new(0)) case AuthSASL{ms}: auth.enc(10, Bytes.concat(names.enc(ms))) case AuthSASLContinue{d}: auth.enc(11, d) case AuthSASLFinal{d}: auth.enc(12, d) case AuthOther{+code, d}: auth.enc(code, d) case ParameterStatus{n, v}: frame(83, Bytes.append(cstr.enc(n), cstr.enc(v))) case BackendKeyData{+pid, +key}: frame(75, Bytes.append(be32(pid), be32(key))) case ReadyForQuery{+s}: frame(90, byte1(s)) case RowDescription{fs}: frame(84, n16(fields.enc(fs))) case DataRow{cs}: frame(68, n16(values(cs))) case CommandComplete{t}: frame(67, cstr.enc(t)) case ErrorResponse{fs}: frame(69, Bytes.concat(notices.enc(fs))) case NoticeResponse{fs}: frame(78, Bytes.concat(notices.enc(fs))) case ParseComplete{}: frame(49, Bytes.new(0)) case BindComplete{}: frame(50, Bytes.new(0)) case CloseComplete{}: frame(51, Bytes.new(0)) case NoData{}: frame(110, Bytes.new(0)) case EmptyQuery{}: frame(73, Bytes.new(0)) case PortalSuspended{}: frame(115, Bytes.new(0)) case Other{+tag, b}: frame(tag, b) Uses (15): 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=Back https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=auth.enc 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=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=fields.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=names.enc https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=notices.enc https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=values