Envelope.decode_all.go: def of bendonnect-rpc@0.1.0.0 Import: import bendonnect-rpc@0.1.0.0/src/envelope.bend as Envelope Lines 128-140 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=128&end_line=140 import Base import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes # fuel: every envelope takes at least 5 bytes, so (bytes + 1) steps always suffice. def decode_all.go(fuel: Nat, s: Step, +max: U32) -> Result<&2, &1, String, List<&1, Envelope>>: match fuel: case 0n: Fail{"envelope decoder out of fuel"} case 1n+p: match s: case Need{b}: decode_all.fin(Bytes.length(b)) case Bad{r}: Fail{r} case Got{env, rest}: decode_all.cons(env, decode_all.go(p, decode(rest, max), max)) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String 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=length https://jend.leeeet.dev/definition.txt?path=bendonnect-rpc@0.1.0.0/src/envelope.bend&name=Envelope https://jend.leeeet.dev/definition.txt?path=bendonnect-rpc@0.1.0.0/src/envelope.bend&name=Step https://jend.leeeet.dev/definition.txt?path=bendonnect-rpc@0.1.0.0/src/envelope.bend&name=decode https://jend.leeeet.dev/definition.txt?path=bendonnect-rpc@0.1.0.0/src/envelope.bend&name=decode_all.cons https://jend.leeeet.dev/definition.txt?path=bendonnect-rpc@0.1.0.0/src/envelope.bend&name=decode_all.fin