def wal.read.dispatch

mylsm-lsm-store@0.6.0.1 · src/transfer/MigrateIo.bend:545

import mylsm-lsm-store@0.6.0.1/src/transfer/MigrateIo.bend as MigrateIo
import Base
import mylsm-lsm-store@0.6.0.1/src/DurableError.bend as DurableError
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

545# Closes the WAL descriptor before classifying its bytes.
546def wal.read.dispatch(
547  result: Result<&1, &1, U32 & String, Bytes.Bytes>,
548  released: Result<&1, &1, DurableError.Error, Unit>
549) -> Result<&1, &1, Error, Nat>:
550  match result:
551    case Fail{error}: wal.read.failure(error, released)
552    case Done{bytes}: wal.read.success(bytes, released)

Uses (11)

Used by (1)