1#![allow(non_snake_case)]
2#![allow(unused_imports)]
3#![allow(dead_code)]
4
5use serde::{Serialize, Deserialize};
6use serde_json::Value as JsonValue;
7
8pub trait CdpCommand: Serialize {
10 const METHOD: &'static str;
11 type Response: for<'de> Deserialize<'de>;
12}
13
14#[derive(Serialize)]
16pub struct Command<'a, T: CdpCommand> {
17 pub id: u64,
18 pub method: &'static str,
19 pub params: &'a T,
20}
21
22impl<'a, T: CdpCommand> Command<'a, T> {
23 pub fn new(id: u64, params: &'a T) -> Self {
24 Self { id, method: T::METHOD, params }
25 }
26}
27
28#[derive(Deserialize, Debug)]
30pub struct Response<T> {
31 pub id: u64,
32 pub result: T,
33}
34
35#[derive(Deserialize, Debug, Clone, Default)]
37pub struct EmptyReturns {}
38
39#[cfg(feature = "runtime")]
40pub mod runtime;
41#[cfg(feature = "debugger")]
42pub mod debugger;
43#[cfg(feature = "heapprofiler")]
44pub mod heapprofiler;
45#[cfg(feature = "profiler")]
46pub mod profiler;
47#[cfg(feature = "accessibility")]
48pub mod accessibility;
49#[cfg(feature = "animation")]
50pub mod animation;
51#[cfg(feature = "audits")]
52pub mod audits;
53#[cfg(feature = "autofill")]
54pub mod autofill;
55#[cfg(feature = "backgroundservice")]
56pub mod backgroundservice;
57#[cfg(feature = "bluetoothemulation")]
58pub mod bluetoothemulation;
59#[cfg(feature = "browser")]
60pub mod browser;
61#[cfg(feature = "css")]
62pub mod css;
63#[cfg(feature = "cachestorage")]
64pub mod cachestorage;
65#[cfg(feature = "cast")]
66pub mod cast;
67#[cfg(feature = "crashreportcontext")]
68pub mod crashreportcontext;
69#[cfg(feature = "dom")]
70pub mod dom;
71#[cfg(feature = "domdebugger")]
72pub mod domdebugger;
73#[cfg(feature = "domsnapshot")]
74pub mod domsnapshot;
75#[cfg(feature = "domstorage")]
76pub mod domstorage;
77#[cfg(feature = "deviceaccess")]
78pub mod deviceaccess;
79#[cfg(feature = "deviceorientation")]
80pub mod deviceorientation;
81#[cfg(feature = "emulation")]
82pub mod emulation;
83#[cfg(feature = "eventbreakpoints")]
84pub mod eventbreakpoints;
85#[cfg(feature = "extensions")]
86pub mod extensions;
87#[cfg(feature = "fedcm")]
88pub mod fedcm;
89#[cfg(feature = "fetch")]
90pub mod fetch;
91#[cfg(feature = "filesystem")]
92pub mod filesystem;
93#[cfg(feature = "headlessexperimental")]
94pub mod headlessexperimental;
95#[cfg(feature = "io")]
96pub mod io;
97#[cfg(feature = "indexeddb")]
98pub mod indexeddb;
99#[cfg(feature = "input")]
100pub mod input;
101#[cfg(feature = "inspector")]
102pub mod inspector;
103#[cfg(feature = "layertree")]
104pub mod layertree;
105#[cfg(feature = "log")]
106pub mod log;
107#[cfg(feature = "media")]
108pub mod media;
109#[cfg(feature = "memory")]
110pub mod memory;
111#[cfg(feature = "network")]
112pub mod network;
113#[cfg(feature = "overlay")]
114pub mod overlay;
115#[cfg(feature = "pwa")]
116pub mod pwa;
117#[cfg(feature = "page")]
118pub mod page;
119#[cfg(feature = "performance")]
120pub mod performance;
121#[cfg(feature = "performancetimeline")]
122pub mod performancetimeline;
123#[cfg(feature = "preload")]
124pub mod preload;
125#[cfg(feature = "security")]
126pub mod security;
127#[cfg(feature = "serviceworker")]
128pub mod serviceworker;
129#[cfg(feature = "smartcardemulation")]
130pub mod smartcardemulation;
131#[cfg(feature = "storage")]
132pub mod storage;
133#[cfg(feature = "systeminfo")]
134pub mod systeminfo;
135#[cfg(feature = "target")]
136pub mod target;
137#[cfg(feature = "tethering")]
138pub mod tethering;
139#[cfg(feature = "tracing")]
140pub mod tracing;
141#[cfg(feature = "webaudio")]
142pub mod webaudio;
143#[cfg(feature = "webauthn")]
144pub mod webauthn;