Skip to main content

rustenium_cdp_definitions/browser_protocol/bluetooth_emulation/
results.rs

1use serde::{Deserialize, Serialize};
2#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
3pub struct EnableResult {}
4impl TryFrom<serde_json::Value> for EnableResult {
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, Default, Serialize, Deserialize)]
11pub struct SetSimulatedCentralStateResult {}
12impl TryFrom<serde_json::Value> for SetSimulatedCentralStateResult {
13    type Error = serde_json::Error;
14    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
15        serde_json::from_value(value)
16    }
17}
18#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
19pub struct DisableResult {}
20impl TryFrom<serde_json::Value> for DisableResult {
21    type Error = serde_json::Error;
22    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
23        serde_json::from_value(value)
24    }
25}
26#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
27pub struct SimulatePreconnectedPeripheralResult {}
28impl TryFrom<serde_json::Value> for SimulatePreconnectedPeripheralResult {
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 SimulateAdvertisementResult {}
36impl TryFrom<serde_json::Value> for SimulateAdvertisementResult {
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, Default, Serialize, Deserialize)]
43pub struct SimulateGattOperationResponseResult {}
44impl TryFrom<serde_json::Value> for SimulateGattOperationResponseResult {
45    type Error = serde_json::Error;
46    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
47        serde_json::from_value(value)
48    }
49}
50#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
51pub struct SimulateCharacteristicOperationResponseResult {}
52impl TryFrom<serde_json::Value> for SimulateCharacteristicOperationResponseResult {
53    type Error = serde_json::Error;
54    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
55        serde_json::from_value(value)
56    }
57}
58#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
59pub struct SimulateDescriptorOperationResponseResult {}
60impl TryFrom<serde_json::Value> for SimulateDescriptorOperationResponseResult {
61    type Error = serde_json::Error;
62    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
63        serde_json::from_value(value)
64    }
65}
66#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
67pub struct AddServiceResult {
68    #[doc = "An identifier that uniquely represents this service."]
69    #[serde(rename = "serviceId")]
70    pub service_id: String,
71}
72impl TryFrom<serde_json::Value> for AddServiceResult {
73    type Error = serde_json::Error;
74    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
75        serde_json::from_value(value)
76    }
77}
78#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
79pub struct RemoveServiceResult {}
80impl TryFrom<serde_json::Value> for RemoveServiceResult {
81    type Error = serde_json::Error;
82    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
83        serde_json::from_value(value)
84    }
85}
86#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
87pub struct AddCharacteristicResult {
88    #[doc = "An identifier that uniquely represents this characteristic."]
89    #[serde(rename = "characteristicId")]
90    pub characteristic_id: String,
91}
92impl TryFrom<serde_json::Value> for AddCharacteristicResult {
93    type Error = serde_json::Error;
94    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
95        serde_json::from_value(value)
96    }
97}
98#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
99pub struct RemoveCharacteristicResult {}
100impl TryFrom<serde_json::Value> for RemoveCharacteristicResult {
101    type Error = serde_json::Error;
102    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
103        serde_json::from_value(value)
104    }
105}
106#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
107pub struct AddDescriptorResult {
108    #[doc = "An identifier that uniquely represents this descriptor."]
109    #[serde(rename = "descriptorId")]
110    pub descriptor_id: String,
111}
112impl TryFrom<serde_json::Value> for AddDescriptorResult {
113    type Error = serde_json::Error;
114    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
115        serde_json::from_value(value)
116    }
117}
118#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
119pub struct RemoveDescriptorResult {}
120impl TryFrom<serde_json::Value> for RemoveDescriptorResult {
121    type Error = serde_json::Error;
122    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
123        serde_json::from_value(value)
124    }
125}
126#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
127pub struct SimulateGattDisconnectionResult {}
128impl TryFrom<serde_json::Value> for SimulateGattDisconnectionResult {
129    type Error = serde_json::Error;
130    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
131        serde_json::from_value(value)
132    }
133}