Protobuf.write_value: def of bend-kit-protobuf@0.2.0.0 Import: import bend-kit-protobuf@0.2.0.0/protobuf.bend as Protobuf Lines 373-387 of bend-kit-protobuf@0.2.0.0/protobuf.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-protobuf@0.2.0.0/protobuf.bend&start_line=373&end_line=387 import Base import bend-kit-bytes@0.3.3.0/bytes.bend as B def write_value(v: Value, out: B.Bytes, +max_size: U32) -> Result<&2, &1, Error, B.Bytes>: match v: case Varint{w}: write_varint(w, out, max_size) case Fixed32{w}: write_fixed32(w, out, max_size) case Fixed64{w}: write_fixed64(w, out, max_size) case Blob{b}: B.Bytes{+n, buf} = b do Result<&2, &1, Error, B.Bytes>: next : B.Bytes <- write_varint(Word64{0, n}, out, max_size) append(next, B.Bytes{n, buf}, max_size) case Group{fields}: Fail{Malformed{}} Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 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-protobuf@0.2.0.0/protobuf.bend&name=Error https://jend.leeeet.dev/definition.txt?path=bend-kit-protobuf@0.2.0.0/protobuf.bend&name=Value https://jend.leeeet.dev/definition.txt?path=bend-kit-protobuf@0.2.0.0/protobuf.bend&name=Word64 https://jend.leeeet.dev/definition.txt?path=bend-kit-protobuf@0.2.0.0/protobuf.bend&name=append https://jend.leeeet.dev/definition.txt?path=bend-kit-protobuf@0.2.0.0/protobuf.bend&name=write_fixed32 https://jend.leeeet.dev/definition.txt?path=bend-kit-protobuf@0.2.0.0/protobuf.bend&name=write_fixed64 https://jend.leeeet.dev/definition.txt?path=bend-kit-protobuf@0.2.0.0/protobuf.bend&name=write_varint