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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more