def Bytes.snapshot.scan_prefix.local

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

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

953def Bytes.snapshot.scan_prefix.local(
954  snapshot: Bytes.Snapshot,
955  prefix: PackedBytes.Bytes
956) -> Bytes.Snapshot & Result<&1, &1, Bytes.Error, Bytes.Cursor>:
957  match snapshot:
958    case ByteSnapshot{entries}:
959      Bytes.snapshot.cursor.result(Bytes.snapshot.cursor(entries,
960        ScanBounds{None{}, None{}, Some{prefix}}))
961    case RemoteByteSnapshot{_, _}:
962      (snapshot, Fail{UnsupportedOperation{}})

Uses (11)

Used by (1)