def next
mylsm-lsm-store@0.6.0.1 · src/scan/SstCursor.bend:406
import mylsm-lsm-store@0.6.0.1/src/scan/SstCursor.bend as SstCursor
import Base
import mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend as ByteBlockReader
406
407def next(cursor: Cursor) -> IO(Step):
408 match cursor:
409 case Active{inner, bounds}:
410 match inner:
411 case ByteBlockReader.EntryReady{reader, entries}:
412 match entries:
413 case Con{entry, tail}:
414 scan.entry(entry, ByteBlockReader.EntryReady{reader, tail}, bounds)
415 case Nil{}:
416 scan.start(ByteBlockReader.transition_budget(reader), bounds)
417 case ByteBlockReader.EntryEnded{}:
418 IO.pure(Step, End{})
419 case ByteBlockReader.EntryClosed{}:
420 IO.pure(Step, End{})
421 case ByteBlockReader.EntryFailed{error}:
422 IO.pure(Step, Error{error})
423 case Ended{}: IO.pure(Step, End{})
424 case Closed{}: IO.pure(Step, End{})
425 case Failed{error}: IO.pure(Step, Error{error})