rustenium_cdp_definitions/browser_protocol/memory/
results.rs1use serde::{Deserialize, Serialize};
2#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3pub struct GetDomCountersResult {
4 #[serde(rename = "documents")]
5 pub documents: i64,
6 #[serde(rename = "nodes")]
7 pub nodes: i64,
8 #[serde(rename = "jsEventListeners")]
9 pub js_event_listeners: i64,
10}
11impl TryFrom<serde_json::Value> for GetDomCountersResult {
12 type Error = serde_json::Error;
13 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
14 serde_json::from_value(value)
15 }
16}
17#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
18pub struct GetDomCountersForLeakDetectionResult {
19 #[doc = "DOM object counters."]
20 #[serde(rename = "counters")]
21 #[serde(skip_serializing_if = "Vec::is_empty")]
22 pub counters: Vec<super::types::DomCounter>,
23}
24impl TryFrom<serde_json::Value> for GetDomCountersForLeakDetectionResult {
25 type Error = serde_json::Error;
26 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
27 serde_json::from_value(value)
28 }
29}
30#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
31pub struct PrepareForLeakDetectionResult {}
32impl TryFrom<serde_json::Value> for PrepareForLeakDetectionResult {
33 type Error = serde_json::Error;
34 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
35 serde_json::from_value(value)
36 }
37}
38#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
39pub struct ForciblyPurgeJavaScriptMemoryResult {}
40impl TryFrom<serde_json::Value> for ForciblyPurgeJavaScriptMemoryResult {
41 type Error = serde_json::Error;
42 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
43 serde_json::from_value(value)
44 }
45}
46#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
47pub struct SetPressureNotificationsSuppressedResult {}
48impl TryFrom<serde_json::Value> for SetPressureNotificationsSuppressedResult {
49 type Error = serde_json::Error;
50 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
51 serde_json::from_value(value)
52 }
53}
54#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
55pub struct SimulatePressureNotificationResult {}
56impl TryFrom<serde_json::Value> for SimulatePressureNotificationResult {
57 type Error = serde_json::Error;
58 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
59 serde_json::from_value(value)
60 }
61}
62#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
63pub struct StartSamplingResult {}
64impl TryFrom<serde_json::Value> for StartSamplingResult {
65 type Error = serde_json::Error;
66 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
67 serde_json::from_value(value)
68 }
69}
70#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
71pub struct StopSamplingResult {}
72impl TryFrom<serde_json::Value> for StopSamplingResult {
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, Serialize, Deserialize)]
79pub struct GetAllTimeSamplingProfileResult {
80 #[serde(rename = "profile")]
81 pub profile: super::types::SamplingProfile,
82}
83impl TryFrom<serde_json::Value> for GetAllTimeSamplingProfileResult {
84 type Error = serde_json::Error;
85 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
86 serde_json::from_value(value)
87 }
88}
89#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
90pub struct GetBrowserSamplingProfileResult {
91 #[serde(rename = "profile")]
92 pub profile: super::types::SamplingProfile,
93}
94impl TryFrom<serde_json::Value> for GetBrowserSamplingProfileResult {
95 type Error = serde_json::Error;
96 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
97 serde_json::from_value(value)
98 }
99}
100#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
101pub struct GetSamplingProfileResult {
102 #[serde(rename = "profile")]
103 pub profile: super::types::SamplingProfile,
104}
105impl TryFrom<serde_json::Value> for GetSamplingProfileResult {
106 type Error = serde_json::Error;
107 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
108 serde_json::from_value(value)
109 }
110}