Zero-sized, branded, multi-token phantom capabilities for compile-time data-access and thread-synchronization proofs (a generalized evolution of GhostCell) for the Mnemosyne memory ecosystem.
usecrate::reentrant::error::Reentered;usecore::cell::Cell;/// Holds a gate flag `true` for its lifetime and clears it on scope exit,
/// including a panic unwind. The single point where the re-entrancy flag is
/// acquired and released, shared by both gate types.
pub(super)structReset<'a>(&'aCell<bool>);impl<'a>Reset<'a>{/// Arm the gate, returning the clearing guard, or [`Reentered`] if it is
/// already held.
#[inline]pub(super)fnacquire(active:&'aCell<bool>)->Result<Self, Reentered>{if active.get(){returnErr(Reentered);}
active.set(true);Ok(Self(active))}}implDrop forReset<'_>{#[inline]fndrop(&mutself){self.0.set(false);}}