pub struct InterceptHandle { /* private fields */ }Expand description
RAII guard returned by InterceptBuilder::start (Task 7).
The guard cancels the actor on Drop so interception always tears down
when the handle leaves scope. Call stop instead when the
caller needs to observe Fetch.disable reaching the wire before
proceeding — Drop is fire-and-forget by construction.
Implementations§
Source§impl InterceptHandle
impl InterceptHandle
Sourcepub async fn stop(self) -> Result<(), InterceptionError>
pub async fn stop(self) -> Result<(), InterceptionError>
Stop the actor and wait for it to acknowledge exit.
Cancels the actor’s token, then awaits the oneshot the actor sends
after Fetch.disable reaches the wire. Returns
InterceptionError::SubscriptionClosed if the actor was already
gone (channel closed without a signal — e.g. transport torn down
mid-flight); callers can usually treat that as success since the
effect (interception is off) is identical.
Trait Implementations§
Source§impl Debug for InterceptHandle
impl Debug for InterceptHandle
Source§impl Drop for InterceptHandle
impl Drop for InterceptHandle
Auto Trait Implementations§
impl !RefUnwindSafe for InterceptHandle
impl !UnwindSafe for InterceptHandle
impl Freeze for InterceptHandle
impl Send for InterceptHandle
impl Sync for InterceptHandle
impl Unpin for InterceptHandle
impl UnsafeUnpin for InterceptHandle
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