def Bytes.backup_to.budgeted
mylsm-lsm-store@0.6.0.1 · mylsm.bend:1151
import mylsm-lsm-store@0.6.0.1/mylsm.bend as Mylsm
import Base
import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as RawByteDb
1151def Bytes.backup_to.budgeted(
1152 path: String,
1153 entries: Nat,
1154 pair: RawByteDb.Handle & Nat
1155) -> IO(Bytes.Handle & Result<&1, &1, Bytes.Error, Unit>):
1156 match pair:
1157 case (raw, fuel):
1158 do IO<Bytes.Handle & Result<&1, &1, Bytes.Error, Unit>>:
1159 rooted : RawByteDb.Handle &
1160 Result<&1, &1, RawByteDb.Error, RawByteDb.SnapshotRoot> <-
1161 RawByteDb.snapshot_root_limited(67108864n, raw)
1162 Bytes.backup_to.rooted(path, entries, fuel, rooted)