RestoreIo.temporary.create: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/transfer/RestoreIo.bend as RestoreIo Lines 363-381 of mylsm-lsm-store@0.6.0.1/src/transfer/RestoreIo.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/RestoreIo.bend&start_line=363&end_line=381 import Base import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as Db import mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend as ByteMemTable import mylsm-lsm-store@0.6.0.1/src/transfer/RestorePolicy.bend as RestorePolicy def temporary.create( +destination: String, +temporary: String, created: Result<&1, &1, Db.Error, Db.Handle>, measured: List<&1, ByteMemTable.Entry> & Nat ) -> IO(Result<&1, &1, Error, Unit>): match created: case Fail{error}: IO.pure(Result<&1, &1, Error, Unit>, Fail{Storage{error}}) case Done{handle}: match measured: case (entries, +count): do IO>: written : Db.Handle & Result<&1, &1, Db.Error, Unit> <- write.loop(RestorePolicy.write.fuel(count), WriteNeed{handle, entries}) populated : Result<&1, &1, Error, Unit> <- write.result.path(temporary, written) published : Result<&1, &1, Error, Unit> <- publish.result(destination, temporary, count, populated) return published Uses (19): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=Error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=Handle https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend&name=Entry https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/RestoreIo.bend&name=Error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/RestoreIo.bend&name=WriteState https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/RestoreIo.bend&name=publish.result https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/RestoreIo.bend&name=write.loop https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/RestoreIo.bend&name=write.result.path https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/RestorePolicy.bend&name=write.fuel