def Utf8.snapshot.range.result
mylsm-lsm-store@0.6.0.1 · mylsm.bend:2434
import mylsm-lsm-store@0.6.0.1/mylsm.bend as Mylsm
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as PackedBytes
2434def Utf8.snapshot.range.result(
2435 snapshot: Bytes.Snapshot,
2436 lower: Result<&1, &1, Utf8.Error, Maybe<&1, PackedBytes.Bytes>>,
2437 upper: Result<&1, &1, Utf8.Error, Maybe<&1, PackedBytes.Bytes>>
2438) -> IO(Utf8.Snapshot & Result<&1, &1, Utf8.Error, Utf8.Cursor>):
2439 match lower upper:
2440 case Fail{error} _:
2441 IO.pure(Utf8.Snapshot & Result<&1, &1, Utf8.Error, Utf8.Cursor>,
2442 (Utf8Snapshot{snapshot}, Fail{error}))
2443 case Done{_} Fail{error}:
2444 IO.pure(Utf8.Snapshot & Result<&1, &1, Utf8.Error, Utf8.Cursor>,
2445 (Utf8Snapshot{snapshot}, Fail{error}))
2446 case Done{lower_bound} Done{upper_bound}:
2447 do IO<Utf8.Snapshot & Result<&1, &1, Utf8.Error, Utf8.Cursor>>:
2448 pair : Bytes.Snapshot & Result<&1, &1, Bytes.Error, Bytes.Cursor> <-
2449 Bytes.snapshot.scan_range(snapshot, lower_bound, upper_bound)
2450 return Utf8.snapshot.range.opened(pair)