Skip to main content

rustenium_cdp_definitions/browser_protocol/preload/
commands.rs

1use serde::{Deserialize, Serialize};
2#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3pub struct EnableParams {}
4#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5pub enum EnableMethod {
6    #[serde(rename = "Preload.enable")]
7    Enable,
8}
9#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10pub struct Enable {
11    pub method: EnableMethod,
12    pub params: EnableParams,
13}
14impl Enable {
15    pub const IDENTIFIER: &'static str = "Preload.enable";
16    pub fn identifier(&self) -> &'static str {
17        Self::IDENTIFIER
18    }
19}
20impl crate::CommandResult for Enable {
21    type Result = super::results::EnableResult;
22}
23#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
24pub struct DisableParams {}
25#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
26pub enum DisableMethod {
27    #[serde(rename = "Preload.disable")]
28    Disable,
29}
30#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
31pub struct Disable {
32    pub method: DisableMethod,
33    pub params: DisableParams,
34}
35impl Disable {
36    pub const IDENTIFIER: &'static str = "Preload.disable";
37    pub fn identifier(&self) -> &'static str {
38        Self::IDENTIFIER
39    }
40}
41impl crate::CommandResult for Disable {
42    type Result = super::results::DisableResult;
43}
44group_enum ! (PreloadCommands { Enable (Enable) , Disable (Disable) } + identifiable);