pub struct LockId(/* private fields */);Expand description
Identifier for a pause-lock.
Per R1.2.6, [PAUSE, lockId] and [RESUME, lockId] MUST carry a lock id.
Each node maintains a lockset (HashSet<LockId>); paused derives from
lockset.is_empty(). Unknown-lockId Resume is a no-op (idempotent
dispose).
§Allocation ranges (Slice F, A4 — 2026-05-07)
To prevent collision between user-supplied and dispatcher-allocated lock ids:
[0, 1<<32)— user range. Direct callers ofLockId::new(and the napi-rs binding’su32 → LockIdmarshalling) live here. Pick any value you like; the dispatcher will not allocate any id in this range.[1<<32, u64::MAX]— dispatcher range.crate::Core::alloc_lock_iddraws from this range, starting at1<<32and incrementing. Allocation is monotonic; no recycling.
Both constructors are public — the range convention is by construction at
the dispatcher, not by visibility on the type. If a binding marshals lock
ids beyond u32::MAX from user-facing input, raise the dispatcher floor
(CoreState::next_lock_id) at construction time.
Implementations§
Trait Implementations§
Source§impl Ord for LockId
impl Ord for LockId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for LockId
impl PartialOrd for LockId
impl Copy for LockId
impl Eq for LockId
impl StructuralPartialEq for LockId
Auto Trait Implementations§
impl Freeze for LockId
impl RefUnwindSafe for LockId
impl Send for LockId
impl Sync for LockId
impl Unpin for LockId
impl UnsafeUnpin for LockId
impl UnwindSafe for LockId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.