pub struct BorrowedDispatchPermit<'a> { /* private fields */ }Expand description
Borrowed counterpart to DispatchPermit returned by
BackPressure::acquire_borrowed. Its lifetime is bound to the
&BackPressure it was acquired from, so it cannot cross a
tokio::spawn boundary — use DispatchPermit for that. In return,
acquisition skips the Arc<Semaphore> clone the owned variant pays.
Drop semantics are identical to DispatchPermit: releasing the
semaphore slot and decrementing the live-counter.
Trait Implementations§
Source§impl Debug for BorrowedDispatchPermit<'_>
impl Debug for BorrowedDispatchPermit<'_>
Source§impl Drop for BorrowedDispatchPermit<'_>
impl Drop for BorrowedDispatchPermit<'_>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for BorrowedDispatchPermit<'a>
impl<'a> !UnwindSafe for BorrowedDispatchPermit<'a>
impl<'a> Freeze for BorrowedDispatchPermit<'a>
impl<'a> Send for BorrowedDispatchPermit<'a>
impl<'a> Sync for BorrowedDispatchPermit<'a>
impl<'a> Unpin for BorrowedDispatchPermit<'a>
impl<'a> UnsafeUnpin for BorrowedDispatchPermit<'a>
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