Snapshot.owner.cursor.open.available: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend as Snapshot Lines 886-902 of mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend&start_line=886&end_line=902 import Base # Rejects cursor opens when the owner ID space is exhausted. def owner.cursor.open.available( owner: OwnerRegistry, snapshot_id: U32, max_cursors: Nat ) -> OwnerCursorOpenDecision: match owner: case OwnerRegistry{allocator, reservations, snapshots, cursors}: match allocator: case ResourceIdAllocator{_, exhausted}: match exhausted: case True{}: OwnerCursorRejected{OwnerRegistry{allocator, reservations, snapshots, cursors}} case False{}: owner.cursor.open.request(allocator, reservations, snapshots, cursors, u32.duplicate(snapshot_id), max_cursors) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend&name=OwnerCursorOpenDecision https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend&name=OwnerRegistry https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend&name=ResourceIdAllocator https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend&name=owner.cursor.open.request https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend&name=u32.duplicate