def write_fixed64.limit

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

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

360def write_fixed64.limit(ok: Bool, +n: U32, buf: Array<U32>, v: Word64) -> Result<&2, &1, Error, B.Bytes>:
361  match ok:
362    case False{}:
363      Fail{Limit{}}
364    case True{}:
365      Word64{h, l} = v
366      Done{B.set.u32le(B.set.u32le(B.Bytes{(n + 8 : U32), B.grow(n, buf, (n + 8 : U32))}, n, l), (n + 4 : U32), h)}

Uses (10)

Used by (1)