1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! Network interception via the `Fetch` CDP domain.
//!
//! See the [Interception chapter](https://turtiesocks.github.io/zendriver-rs/interception.html)
//! of the [zendriver-rs user guide](https://turtiesocks.github.io/zendriver-rs/)
//! for narrative examples, glob/regex pattern semantics, and streaming-mode
//! recipes.
//!
//! Two entry points, both built off [`InterceptBuilder`]:
//!
//! - **Rule-based** — chain
//! [`block`](builder::InterceptBuilder::block) /
//! [`redirect`](builder::InterceptBuilder::redirect) /
//! [`respond`](builder::InterceptBuilder::respond) /
//! [`modify_request`](builder::InterceptBuilder::modify_request) and call
//! [`start`](builder::InterceptBuilder::start). The returned
//! [`InterceptHandle`] tears the actor down on drop.
//! - **Stream** — call
//! [`subscribe`](builder::InterceptBuilder::subscribe) to get a `Stream` of
//! [`PausedRequest`]; release each pause by calling one of
//! [`continue_`](PausedRequest::continue_), [`abort`](PausedRequest::abort),
//! [`respond`](PausedRequest::respond), or
//! [`modify_and_continue`](PausedRequest::modify_and_continue).
//!
//! ```no_run
//! # async fn ex(tab: &zendriver_transport::SessionHandle)
//! # -> Result<(), zendriver_interception::InterceptionError> {
//! use zendriver_interception::InterceptBuilder;
//!
//! let _handle = InterceptBuilder::new(tab)
//! .block("*/ads/*")?
//! .redirect("*/old/*", "https://example.com/new/")?
//! .start();
//! // _handle stays in scope -> interception live.
//! # Ok(()) }
//! ```
pub use InterceptHandle;
pub use ;
pub use InterceptionError;
pub use ;
pub use PausedRequest;
pub use Rule;
pub use ;