def Bytes.snapshot.scan_seek

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

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
import mylsm-lsm-store@0.6.0.1/src/scan/RangeCursor.bend as ByteRangeCursor

1617# Advances a live byte cursor to a later inclusive lower bound.
1618def Bytes.snapshot.scan_seek(
1619  cursor: Bytes.Cursor,
1620  lower: Maybe<&1, PackedBytes.Bytes>
1621) -> Bytes.Cursor:
1622  match cursor:
1623    case ByteCursor{inner, bounds}:
1624      ByteCursor{ByteRangeCursor.seek.cursor(inner, lower), bounds}
1625    case ByteFailureCursor{_}: ByteClosedCursor{}
1626    case _: cursor

Uses (4)

Used by (1)