Envelope.encode.of: def of bendonnect-rpc@0.1.0.0 Import: import bendonnect-rpc@0.1.0.0/src/envelope.bend as Envelope Lines 22-27 of bendonnect-rpc@0.1.0.0/src/envelope.bend: https://jend.leeeet.dev/read.txt?path=bendonnect-rpc@0.1.0.0/src/envelope.bend&start_line=22&end_line=27 import Base import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes # 5-byte header followed by the message. def encode.of(+flags: U32, r: Bytes.Bytes & U32) -> Bytes.Bytes: (data, len) = r h1 = Bytes.set(Bytes.new(5), 0, (flags .&. 255 : U32)) h2 = Bytes.set.u32be(h1, 1, len) Bytes.append(h2, data) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.and 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=new https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=set https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=set.u32be