Skip to main content

cdp_driver/protocol/
inspector.rs

1// @generated by `just generate-methods` from protocol/*.json.
2// Do not edit by hand; edit xtask/ and regenerate.
3
4//! The `Inspector` domain.
5//!
6//! Types, command parameters and event payloads for the `Inspector`
7//! domain. The method-name constants for the same domain are in
8//! [`crate::methods`].
9//!
10//! This domain is experimental and may change without notice.
11
12use serde::{Deserialize, Serialize};
13
14/// Disables inspector domain notifications.
15///
16/// Parameters of `Inspector.disable`.
17#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18pub struct DisableParams {}
19
20impl crate::typed::Command for DisableParams {
21    const METHOD: &'static str = "Inspector.disable";
22    type Returns = crate::typed::NoReturns;
23}
24
25/// Enables inspector domain notifications.
26///
27/// Parameters of `Inspector.enable`.
28#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
29pub struct EnableParams {}
30
31impl crate::typed::Command for EnableParams {
32    const METHOD: &'static str = "Inspector.enable";
33    type Returns = crate::typed::NoReturns;
34}
35
36/// Fired when remote debugging connection is about to be terminated. Contains
37/// detach reason.
38///
39/// Payload of the `Inspector.detached` event.
40#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
41pub struct DetachedEvent {
42    /// The reason why connection has been terminated.
43    pub reason: String,
44}
45
46impl crate::typed::Event for DetachedEvent {
47    const METHOD: &'static str = "Inspector.detached";
48}
49
50/// Fired when debugging target has crashed
51///
52/// Payload of the `Inspector.targetCrashed` event.
53#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
54pub struct TargetCrashedEvent {}
55
56impl crate::typed::Event for TargetCrashedEvent {
57    const METHOD: &'static str = "Inspector.targetCrashed";
58}
59
60/// Fired when debugging target has reloaded after crash
61///
62/// Payload of the `Inspector.targetReloadedAfterCrash` event.
63#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
64pub struct TargetReloadedAfterCrashEvent {}
65
66impl crate::typed::Event for TargetReloadedAfterCrashEvent {
67    const METHOD: &'static str = "Inspector.targetReloadedAfterCrash";
68}
69
70/// Fired on worker targets when main worker script and any imported scripts
71/// have been evaluated.
72///
73/// Experimental: may change without notice.
74///
75/// Payload of the `Inspector.workerScriptLoaded` event.
76#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
77pub struct WorkerScriptLoadedEvent {}
78
79impl crate::typed::Event for WorkerScriptLoadedEvent {
80    const METHOD: &'static str = "Inspector.workerScriptLoaded";
81}