Runner.encode: def of bend-kit-runner@0.13.0.1 Import: import bend-kit-runner@0.13.0.1/runner.bend as Runner Lines 508-531 of bend-kit-runner@0.13.0.1/runner.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-runner@0.13.0.1/runner.bend&start_line=508&end_line=531 import Base import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes def encode(~A: Data, ~penc: A -> Bytes.Bytes, op: Op) -> Bytes.Bytes: match op: case Enqueue{+d, x}: Bytes.append(put.u64(Bytes.set.u32le(Bytes.new(12), 0, 1), 4, d), penc(x)) case Select{+now}: head(2, now, 0n) case Complete{+i}: head(3, i, 0n) case Cancel{+i}: head(4, i, 0n) case Requeue{+i, +d}: head(5, i, d) case Defer{+i, +d}: head(6, i, d) case Abandon{+i, w, +at}: Bytes.append(head(8, i, why.code(w)), put.u64(Bytes.new(8), 0, at)) case Revive{+i, +d}: head(9, i, d) case Purge{+t}: head(11, t, 0n) case PurgeAll{}: head(12, 0n, 0n) case Break{k, b}: snap.brk(snap.key(snap.u32(Bytes.new(0), 10), k), b) Uses (11): https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=append https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=new https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=set.u32le https://jend.leeeet.dev/definition.txt?path=bend-kit-runner@0.13.0.1/runner.bend&name=Op https://jend.leeeet.dev/definition.txt?path=bend-kit-runner@0.13.0.1/runner.bend&name=head https://jend.leeeet.dev/definition.txt?path=bend-kit-runner@0.13.0.1/runner.bend&name=put.u64 https://jend.leeeet.dev/definition.txt?path=bend-kit-runner@0.13.0.1/runner.bend&name=snap.brk https://jend.leeeet.dev/definition.txt?path=bend-kit-runner@0.13.0.1/runner.bend&name=snap.key https://jend.leeeet.dev/definition.txt?path=bend-kit-runner@0.13.0.1/runner.bend&name=snap.u32 https://jend.leeeet.dev/definition.txt?path=bend-kit-runner@0.13.0.1/runner.bend&name=why.code