def snapshot.root.get.opened
mylsm-lsm-store@0.6.0.1 · src/ByteDurableDb.bend:2966
import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as ByteDurableDb
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
2966def snapshot.root.get.opened(
2967 query: Bytes.Bytes,
2968 opened: Result<&1, &1, Error, SnapshotCursorRoot>
2969) -> IO(Result<&1, &1, Error, Maybe<&1, Bytes.Bytes>>):
2970 match opened:
2971 case Fail{error}:
2972 IO.pure(Result<&1, &1, Error, Maybe<&1, Bytes.Bytes>>, Fail{error})
2973 case Done{SnapshotCursorRoot{retained_bytes, cursor}}:
2974 snapshot.root.get.loop(Nat.add(retained_bytes, 2n),
2975 SnapshotPointNeed{cursor, query})