Clojure/Datomic-style lazy cursor representing a 9-byte Slot (tag + value)
in an immutable xitdb store.
Because %Xitdb.Cursor{} holds only the NIF database resource reference and the
9-byte slot coordinates (tag, tag_id, value), it is a pure Elixir value:
- Can be passed across BEAM processes (
Task.async/1, GenServers, ETS, LiveView assigns) with zero mutexes or dangling pointer hazards. - Implements
Access(cursor["key"],cursor[0],get_in/2,put_in/3,update_in/3,pop_in/2). - Implements
Enumerable(Enum.count/1in $O(1)$ on counted collections,Enum.member?/2in $O(1)$ / $O(\log N)$ via HAMT/B+Tree lookup,Enum.slice/2in $O(\log N)$ via index seek, andEnum.to_list/1/Stream.*). - Implements
Inspectwith a safe, bounded preview.