def put.sliced

mylsm-lsm-store@0.6.0.1 · src/coordinator/Operation.bend:60

import mylsm-lsm-store@0.6.0.1/src/coordinator/Operation.bend as Operation
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

60def put.sliced(
61  copies: Bytes.Bytes & Bytes.Bytes,
62  key_lengths: U32 & U32,
63  value_lengths: U32 & U32
64) -> Decision:
65  match copies:
66    case (key_source, value_source):
67      match key_lengths:
68        case (key_length, key_offset):
69          match value_lengths:
70            case (value_length, _):
71              put.result(Bytes.slice(key_source, 8, key_length),
72                Bytes.slice(value_source, (8 + key_offset : U32), value_length))

Uses (8)

Used by (1)