Skip to main content

rustenium_cdp_definitions/browser_protocol/extensions/
results.rs

1use serde::{Deserialize, Serialize};
2#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
3pub struct TriggerActionResult {}
4impl TryFrom<serde_json::Value> for TriggerActionResult {
5    type Error = serde_json::Error;
6    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
7        serde_json::from_value(value)
8    }
9}
10#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11pub struct LoadUnpackedResult {
12    #[doc = "Extension id."]
13    #[serde(rename = "id")]
14    pub id: String,
15}
16impl TryFrom<serde_json::Value> for LoadUnpackedResult {
17    type Error = serde_json::Error;
18    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
19        serde_json::from_value(value)
20    }
21}
22#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
23pub struct GetExtensionsResult {
24    #[serde(rename = "extensions")]
25    #[serde(skip_serializing_if = "Vec::is_empty")]
26    pub extensions: Vec<super::types::ExtensionInfo>,
27}
28impl TryFrom<serde_json::Value> for GetExtensionsResult {
29    type Error = serde_json::Error;
30    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
31        serde_json::from_value(value)
32    }
33}
34#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
35pub struct UninstallResult {}
36impl TryFrom<serde_json::Value> for UninstallResult {
37    type Error = serde_json::Error;
38    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
39        serde_json::from_value(value)
40    }
41}
42#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
43pub struct GetStorageItemsResult {
44    #[serde(rename = "data")]
45    pub data: serde_json::Value,
46}
47impl TryFrom<serde_json::Value> for GetStorageItemsResult {
48    type Error = serde_json::Error;
49    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
50        serde_json::from_value(value)
51    }
52}
53#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
54pub struct RemoveStorageItemsResult {}
55impl TryFrom<serde_json::Value> for RemoveStorageItemsResult {
56    type Error = serde_json::Error;
57    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
58        serde_json::from_value(value)
59    }
60}
61#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
62pub struct ClearStorageItemsResult {}
63impl TryFrom<serde_json::Value> for ClearStorageItemsResult {
64    type Error = serde_json::Error;
65    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
66        serde_json::from_value(value)
67    }
68}
69#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
70pub struct SetStorageItemsResult {}
71impl TryFrom<serde_json::Value> for SetStorageItemsResult {
72    type Error = serde_json::Error;
73    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
74        serde_json::from_value(value)
75    }
76}