Protobuf.decode.step.kind: def of bend-kit-protobuf@0.2.0.0 Import: import bend-kit-protobuf@0.2.0.0/protobuf.bend as Protobuf Lines 224-241 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=224&end_line=241 import Base import bend-kit-bytes@0.3.3.0/bytes.bend as B def decode.step.kind(kind: U32, c: B.Cursor, +depth: Nat, stack: List<&1, Frame>, acc: List<&1, Field>, +number: U32) -> Result<&2, &1, Error, DecodeState>: match kind: case 3: match depth: case 0n: Fail{Limit{}} case 1n+d: Done{decode.state(c, d, Con{Frame{number, acc, 1n+d}, stack}, Nil{})} case 4: match stack: case Nil{}: Fail{Malformed{}} case Con{Frame{expected, outer, parent_depth}, tail}: decode.step.close(U32.is_eq(number, expected), c, number, outer, parent_depth, tail, acc) case _: do Result<&2, &1, Error, DecodeState>: r : B.Cursor & Value <- read_value(kind, c) decode.step.value(depth, stack, acc, number, r) Uses (20): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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=Pair 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=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Con https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Nil https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Cursor https://jend.leeeet.dev/definition.txt?path=bend-kit-protobuf@0.2.0.0/protobuf.bend&name=DecodeState 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=Field https://jend.leeeet.dev/definition.txt?path=bend-kit-protobuf@0.2.0.0/protobuf.bend&name=Frame 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=decode.state https://jend.leeeet.dev/definition.txt?path=bend-kit-protobuf@0.2.0.0/protobuf.bend&name=decode.step.close https://jend.leeeet.dev/definition.txt?path=bend-kit-protobuf@0.2.0.0/protobuf.bend&name=decode.step.value https://jend.leeeet.dev/definition.txt?path=bend-kit-protobuf@0.2.0.0/protobuf.bend&name=read_value