def chunk.end

bend-kit-cbor@0.3.0.0 · cbor.bend:699

import bend-kit-cbor@0.3.0.0/cbor.bend as Cbor
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

699# Each chunk is a definite string of the same major type, UTF-8 by itself for text (RFC 8949 §3.2.3).
700def chunk.end(stop: Bool, ok: Bool, +text: Bool, chunks: List<&1, Bytes.Bytes>, +arg: W64, +i: U32, a: Array<U32>, +len: U32, stack: List<&1, Frame>) -> Array<U32> & St:
701  match stop:
702    case True{}:
703      (a, SDone{wrap(text, Bytes.concat(List.reverse(&1, Bytes.Bytes, chunks))), i, stack})
704    case False{}:
705      chunk.more(ok, text, chunks, arg, i, a, len, stack)

Uses (14)

Used by (1)