def finish

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

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

65def finish(o: W) -> Bytes.Bytes:
66  W{buf, cap, +n, +word} = o
67  +r = (n .&. 3 : U32)
68  +k = (n >> 2n : U32)
69  +full = U32.is_ne(r, 0)
70  Bytes.Bytes{n, finish.buf(full, cap, buf, k, r, word)}

Uses (7)

Used by (1)