def write.encoder.failed

mylsm-lsm-store@0.6.0.1 · src/ByteSstIo.bend:303

import mylsm-lsm-store@0.6.0.1/src/ByteSstIo.bend as ByteSstIo
import Base

303# Closes the temporary file when encoding rejects sorted input.
304def write.encoder.failed(
305  opened: Result<&1, &1, U32 & String, File>
306) -> IO(Result<&1, &1, U32 & String, Unit>):
307  match opened:
308    case Fail{error}:
309      IO.pure(Result<&1, &1, U32 & String, Unit>, Fail{error})
310    case Done{file}:
311      do IO<Result<&1, &1, U32 & String, Unit>>:
312        _closed : Unit <- File.close(file)
313        return Fail{corruption("byte SST encoder rejected its sorted input")}

Uses (11)

Used by (1)