def cursor.release

mylsm-lsm-store@0.6.0.1 · src/scan/Snapshot.bend:1186

import mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend as Snapshot
import Base

1186# Releases one cursor reference, rejecting underflow and closed snapshots.
1187def cursor.release(lifecycle: Lifecycle) -> LifecycleDecision:
1188  match lifecycle:
1189    case Live{cursor_count}:
1190      match cursor_count:
1191        case 0n: Invalid{}
1192        case 1n+rest: Advanced{Live{rest}}
1193    case Closed{}: Invalid{}

Uses (3)

Used by (0)

No other definition uses this definition.