def Bytes.scan_open.owned.snapshot

mylsm-lsm-store@0.6.0.1 · mylsm.bend:1445

import mylsm-lsm-store@0.6.0.1/mylsm.bend as Mylsm
import Base
import mylsm-lsm-store@0.6.0.1/src/scan/RangeCursor.bend as ByteRangeCursor

1445def Bytes.scan_open.owned.snapshot(
1446  opened: Bytes.Handle & Result<&1, &1, Bytes.Error, Bytes.Snapshot>,
1447  bounds: Bytes.ScanBounds
1448) -> IO(Bytes.Handle & Result<&1, &1, Bytes.Error, Bytes.Cursor>):
1449  match opened:
1450    case (handle, Fail{error}):
1451      IO.pure(Bytes.Handle & Result<&1, &1, Bytes.Error, Bytes.Cursor>,
1452        (handle, Fail{error}))
1453    case (handle, Done{snapshot}):
1454      match bounds:
1455        case ScanBounds{lower, upper, prefix}:
1456          Bytes.scan_open.owned.bounds(handle, snapshot,
1457            ByteRangeCursor.bounds.clone(ByteRangeCursor.Bounds{lower, upper, prefix}))

Uses (13)

Used by (1)