Expand description
Identifier newtypes — the handle-protocol’s core type vocabulary.
Mirrors ~/src/graphrefly-ts/src/__experiments__/handle-core/core.ts:52–57
under Rust’s stricter type discipline (CLAUDE.md Rust invariant 8 — no raw
integers in public APIs).
§Cleaving plane
NodeId— identifies a node in the graph. Allocated by the Core; opaque to bindings.HandleId— identifies a user valueTin the binding-side registry. The Core never seesT; equals-substitution underequals: identityis au64compare onHandleId(zero FFI). Custom equals crosses the boundary explicitly viacrate::boundary::BindingBoundary::custom_equals.FnId— identifies a user function (or a custom-equals oracle) in the binding-side registry.LockId— identifies a pause-lock. Multiple pausers can hold distinct locks on the same node; the node remains paused until the lockset is empty (R1.2.6, R2.6).
All four are u64 newtypes for cheap hashing, atomic increments, and
lock-free version counters. They are intentionally NOT
interconvertible — NodeId(7) and HandleId(7) are different things.
Structs§
- FnId
- Identifier for a user function (or a custom-equals oracle) in the binding-side registry.
- Handle
Id - Identifier for a user value
Tin the binding-side registry. - LockId
- Identifier for a pause-lock.
- NodeId
- Identifier for a node in the Core’s dispatcher.
Constants§
- NO_
HANDLE - Sentinel “no handle” — distinct from any valid handle (which start at 1).