Skip to main content

rustenium_cdp_definitions/browser_protocol/pwa/
results.rs

1use serde::{Deserialize, Serialize};
2#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3pub struct GetOsAppStateResult {
4    #[serde(rename = "badgeCount")]
5    pub badge_count: i64,
6    #[serde(rename = "fileHandlers")]
7    #[serde(skip_serializing_if = "Vec::is_empty")]
8    pub file_handlers: Vec<super::types::FileHandler>,
9}
10impl TryFrom<serde_json::Value> for GetOsAppStateResult {
11    type Error = serde_json::Error;
12    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
13        serde_json::from_value(value)
14    }
15}
16#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
17pub struct InstallResult {}
18impl TryFrom<serde_json::Value> for InstallResult {
19    type Error = serde_json::Error;
20    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
21        serde_json::from_value(value)
22    }
23}
24#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
25pub struct UninstallResult {}
26impl TryFrom<serde_json::Value> for UninstallResult {
27    type Error = serde_json::Error;
28    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
29        serde_json::from_value(value)
30    }
31}
32#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
33pub struct LaunchResult {
34    #[doc = "ID of the tab target created as a result."]
35    #[serde(rename = "targetId")]
36    pub target_id: crate::browser_protocol::target::types::TargetId,
37}
38impl TryFrom<serde_json::Value> for LaunchResult {
39    type Error = serde_json::Error;
40    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
41        serde_json::from_value(value)
42    }
43}
44#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
45pub struct LaunchFilesInAppResult {
46    #[doc = "IDs of the tab targets created as the result."]
47    #[serde(rename = "targetIds")]
48    #[serde(skip_serializing_if = "Vec::is_empty")]
49    pub target_ids: Vec<crate::browser_protocol::target::types::TargetId>,
50}
51impl TryFrom<serde_json::Value> for LaunchFilesInAppResult {
52    type Error = serde_json::Error;
53    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
54        serde_json::from_value(value)
55    }
56}
57#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
58pub struct OpenCurrentPageInAppResult {}
59impl TryFrom<serde_json::Value> for OpenCurrentPageInAppResult {
60    type Error = serde_json::Error;
61    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
62        serde_json::from_value(value)
63    }
64}
65#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
66pub struct ChangeAppUserSettingsResult {}
67impl TryFrom<serde_json::Value> for ChangeAppUserSettingsResult {
68    type Error = serde_json::Error;
69    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
70        serde_json::from_value(value)
71    }
72}