Expand description
Internal CDP transport for zendriver: WebSocket I/O, command/response
routing, event broadcast.
Use via the zendriver crate’s re-exports. This crate is published so
the workspace can compile end-to-end but its surface is not covered by the
same SemVer guarantees as zendriver; expect minor versions to rearrange
types here freely. See SEMVER.md in the repo root for the policy.
For a high-level walkthrough of the actor/observer model see the Architecture chapter of the zendriver-rs user guide.
§What lives here
Connection— cheap, clonable handle to the actor task. AllTabs andElements hold one.SessionHandle— a connection scoped to a particular CDPsessionId.CdpCommand/CdpInbound/CdpRpcError/RawEvent— wire types.TargetObserver— observer trait fired onTarget.attachedToTargetbefore the debugger is released; used byzendriver-stealthto install patches on new pages.CallError/TransportError— error types surfaced viazendriver’sZendriverError::Transport/Cdpvariants.
Re-exports§
pub use connection::Connection;pub use connection::connect;pub use connection::connect_with_observers;pub use connection::spawn_actor;pub use connection::spawn_actor_with_observers;pub use error::CallError;pub use error::TransportError;pub use frame::CdpCommand;pub use frame::CdpInbound;pub use frame::CdpRpcError;pub use frame::RawEvent;pub use observer::ObserverError;pub use observer::PausedSession;pub use observer::TargetInfo;pub use observer::TargetObserver;pub use session::SessionHandle;
Modules§
- actor
- ConnectionActor: tokio task owning the WebSocket. Routes commands and
responses by id, fans events out on a broadcast bus, and dispatches
TargetObservers onTarget.attachedToTarget. - connection
Connection— the public handle to the transport actor.- error
- Transport-layer errors.
- frame
- CDP frame envelope types. Wraps
chromiumoxide_cdptyped parameters with the id / method / session_id envelope CDP requires on the wire. - observer
TargetObservertrait — fires on each new attached target while the target is paused at the debugger.- session
SessionHandle: aConnectionbound to a particular CDPsessionId. All commands sent through the handle are routed to that target.- testing
testing - Test-only helpers — gated behind
cfg(any(test, feature = "testing")).