rustenium_bidi_definitions/browser/
results.rs1use serde::{Deserialize, Serialize};
2#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3pub struct CloseResult {
4 #[serde(flatten)]
5 #[serde(default)]
6 pub extensible: std::collections::HashMap<String, serde_json::Value>,
7}
8impl TryFrom<serde_json::Value> for CloseResult {
9 type Error = serde_json::Error;
10 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
11 serde_json::from_value(value)
12 }
13}
14pub type CreateUserContextResult = super::types::UserContextInfo;
15#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16pub struct GetClientWindowsResult {
17 #[serde(rename = "clientWindows")]
18 #[serde(skip_serializing_if = "Vec::is_empty")]
19 pub client_windows: Vec<super::types::ClientWindowInfo>,
20}
21impl TryFrom<serde_json::Value> for GetClientWindowsResult {
22 type Error = serde_json::Error;
23 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
24 serde_json::from_value(value)
25 }
26}
27#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
28pub struct GetUserContextsResult {
29 #[serde(rename = "userContexts")]
30 #[serde(skip_serializing_if = "Vec::is_empty")]
31 pub user_contexts: Vec<super::types::UserContextInfo>,
32}
33impl TryFrom<serde_json::Value> for GetUserContextsResult {
34 type Error = serde_json::Error;
35 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
36 serde_json::from_value(value)
37 }
38}
39#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
40pub struct RemoveUserContextResult {
41 #[serde(flatten)]
42 #[serde(default)]
43 pub extensible: std::collections::HashMap<String, serde_json::Value>,
44}
45impl TryFrom<serde_json::Value> for RemoveUserContextResult {
46 type Error = serde_json::Error;
47 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
48 serde_json::from_value(value)
49 }
50}
51pub type SetClientWindowStateResult = super::types::ClientWindowInfo;
52#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
53pub struct SetDownloadBehaviorResult {
54 #[serde(flatten)]
55 #[serde(default)]
56 pub extensible: std::collections::HashMap<String, serde_json::Value>,
57}
58impl TryFrom<serde_json::Value> for SetDownloadBehaviorResult {
59 type Error = serde_json::Error;
60 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
61 serde_json::from_value(value)
62 }
63}