def packed_decode.limit

bend-kit-protobuf@0.2.0.0 · protobuf.bend:508

import bend-kit-protobuf@0.2.0.0/protobuf.bend as Protobuf
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as B

508def packed_decode.limit(fits: Bool, kind: U32, bytes: B.Bytes, n: U32) -> Result<&2, &1, Error, List<&1, Value>>:
509  match fits:
510    case False{}:
511      Fail{Limit{}}
512    case True{}:
513      packed_decode.result(packed_decode.go(1n+U32.to_nat(n), kind, packed_decode.state(B.Cursor.new(bytes), Nil{})))

Uses (13)

Used by (1)