js_protocol/console/
mod.rs1use serde::{Serialize, Deserialize};
3use serde_json::Value as JsonValue;
4
5#[derive(Debug, Clone, Serialize, Deserialize, Default)]
8#[serde(rename_all = "camelCase")]
9pub struct ConsoleMessage {
10 pub source: String,
13 pub level: String,
16 pub text: String,
19 #[serde(skip_serializing_if = "Option::is_none")]
22 pub url: Option<String>,
23 #[serde(skip_serializing_if = "Option::is_none")]
26 pub line: Option<i64>,
27 #[serde(skip_serializing_if = "Option::is_none")]
30 pub column: Option<i64>,
31}
32
33#[derive(Debug, Clone, Serialize, Deserialize, Default)]
34pub struct ClearMessagesParams {}
35
36impl ClearMessagesParams { pub const METHOD: &'static str = "Console.clearMessages"; }
37
38impl crate::CdpCommand for ClearMessagesParams {
39 const METHOD: &'static str = "Console.clearMessages";
40 type Response = crate::EmptyReturns;
41}
42
43#[derive(Debug, Clone, Serialize, Deserialize, Default)]
44pub struct DisableParams {}
45
46impl DisableParams { pub const METHOD: &'static str = "Console.disable"; }
47
48impl crate::CdpCommand for DisableParams {
49 const METHOD: &'static str = "Console.disable";
50 type Response = crate::EmptyReturns;
51}
52
53#[derive(Debug, Clone, Serialize, Deserialize, Default)]
54pub struct EnableParams {}
55
56impl EnableParams { pub const METHOD: &'static str = "Console.enable"; }
57
58impl crate::CdpCommand for EnableParams {
59 const METHOD: &'static str = "Console.enable";
60 type Response = crate::EmptyReturns;
61}