def Bytes.snapshot.scan_range.local

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

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

941def Bytes.snapshot.scan_range.local(
942  snapshot: Bytes.Snapshot,
943  lower: Maybe<&1, PackedBytes.Bytes>,
944  upper: Maybe<&1, PackedBytes.Bytes>
945) -> Bytes.Snapshot & Result<&1, &1, Bytes.Error, Bytes.Cursor>:
946  match snapshot:
947    case ByteSnapshot{entries}:
948      Bytes.snapshot.cursor.result(
949        Bytes.snapshot.cursor(entries, ScanBounds{lower, upper, None{}}))
950    case RemoteByteSnapshot{_, _}:
951      (snapshot, Fail{UnsupportedOperation{}})

Uses (11)

Used by (1)