pub struct Dropper { /* private fields */ }Expand description
Cheaply-cloneable handle for banning + dropping response ids. Shared
between the caller (who invokes Self::drop) and the proxy (which
checks Self::is_banned on every initialize).
Implementations§
Source§impl Dropper
impl Dropper
pub fn new() -> Self
Sourcepub async fn drop(&self, response_id: String)
pub async fn drop(&self, response_id: String)
Forever-ban response_id, then tear down any live session for it.
Bans FIRST so an initialize for the same id that runs
concurrently observes the ban (its post-insert check then tears
the session down itself). Teardown is idempotent, so a double
teardown across the race is harmless.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Dropper
impl !UnwindSafe for Dropper
impl Freeze for Dropper
impl Send for Dropper
impl Sync for Dropper
impl Unpin for Dropper
impl UnsafeUnpin for Dropper
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<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