pub struct InterceptHandle { /* private fields */ }interception only.Expand description
Network interception API re-exports.
Gated by the interception cargo feature. The full surface lives in the
zendriver-interception sub-crate; these aliases let downstream code
reach the types without depending on the sub-crate directly.
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.