Skip to main content

rustenium_cdp_definitions/browser_protocol/tracing/
results.rs

1use serde::{Deserialize, Serialize};
2#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
3pub struct EndResult {}
4impl TryFrom<serde_json::Value> for EndResult {
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 GetCategoriesResult {
12    #[doc = "A list of supported tracing categories."]
13    #[serde(rename = "categories")]
14    #[serde(skip_serializing_if = "Vec::is_empty")]
15    pub categories: Vec<String>,
16}
17impl TryFrom<serde_json::Value> for GetCategoriesResult {
18    type Error = serde_json::Error;
19    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
20        serde_json::from_value(value)
21    }
22}
23#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
24pub struct GetTrackEventDescriptorResult {
25    #[doc = "Base64-encoded serialized perfetto.protos.TrackEventDescriptor protobuf message."]
26    #[serde(rename = "descriptor")]
27    pub descriptor: crate::Binary,
28}
29impl TryFrom<serde_json::Value> for GetTrackEventDescriptorResult {
30    type Error = serde_json::Error;
31    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
32        serde_json::from_value(value)
33    }
34}
35#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
36pub struct RecordClockSyncMarkerResult {}
37impl TryFrom<serde_json::Value> for RecordClockSyncMarkerResult {
38    type Error = serde_json::Error;
39    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
40        serde_json::from_value(value)
41    }
42}
43#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
44pub struct RequestMemoryDumpResult {
45    #[doc = "GUID of the resulting global memory dump."]
46    #[serde(rename = "dumpGuid")]
47    pub dump_guid: String,
48    #[doc = "True iff the global memory dump succeeded."]
49    #[serde(rename = "success")]
50    pub success: bool,
51}
52impl TryFrom<serde_json::Value> for RequestMemoryDumpResult {
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 StartResult {}
60impl TryFrom<serde_json::Value> for StartResult {
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}