def encode.records

mylsm-lsm-store@0.6.0.1 · src/ByteWal.bend:121

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

121# Builds the checksummed frame from encoded records and their shared count.
122def encode.records(
123  result: Result<&1, &1, Wal.Error, List<&1, Bytes.Bytes> & U32>
124) -> Result<&1, &1, Wal.Error, Bytes.Bytes>:
125  match result:
126    case Fail{error}:
127      Fail{error}
128    case Done{(parts, count)}:
129      Wal.frame.payload(count, Done{parts})

Uses (8)

Used by (1)