pub struct TierGuard { /* private fields */ }Expand description
RAII guard — pushes a tier onto the current-thread stack on
construction, pops on drop. Lets lifecycle prologues enforce
tier ordering across .await points without nesting the rest of
the body inside a with_tier closure. Debug builds carry the
ordering check; release builds compile to a zero-sized no-op.
Field/declaration-order note: callers must declare the guard
before the permit/hold it is scoping. Rust drops locals in
reverse declaration order, so _tier declared first drops last —
after the lock/permit releases — matching with_tier semantics.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TierGuard
impl RefUnwindSafe for TierGuard
impl Send for TierGuard
impl Sync for TierGuard
impl Unpin for TierGuard
impl UnsafeUnpin for TierGuard
impl UnwindSafe for TierGuard
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