def write.result.path
mylsm-lsm-store@0.6.0.1 · src/transfer/RestoreIo.bend:175
import mylsm-lsm-store@0.6.0.1/src/transfer/RestoreIo.bend as RestoreIo
import Base
import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as Db
175def write.result.path(
176 path: String,
177 pair: Db.Handle & Result<&1, &1, Db.Error, Unit>
178) -> IO(Result<&1, &1, Error, Unit>):
179 match pair:
180 case (handle, Fail{error}): cleanup.handle(path, handle, error)
181 case (handle, Done{Unit{}}):
182 do IO<Result<&1, &1, Error, Unit>>:
183 flushed : Db.Handle & Result<&1, &1, Db.Error, Unit> <- Db.flush(handle)
184 result : Result<&1, &1, Error, Unit> <- flush.result(path, flushed)
185 return result