rustenium_cdp_definitions/browser_protocol/audits/
results.rs1use serde::{Deserialize, Serialize};
2#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3pub struct GetEncodedResponseResult {
4 #[doc = "The encoded body as a base64 string. Omitted if sizeOnly is true."]
5 #[serde(rename = "body")]
6 #[serde(skip_serializing_if = "Option::is_none")]
7 #[serde(default)]
8 pub body: Option<crate::Binary>,
9 #[doc = "Size before re-encoding."]
10 #[serde(rename = "originalSize")]
11 pub original_size: i64,
12 #[doc = "Size after re-encoding."]
13 #[serde(rename = "encodedSize")]
14 pub encoded_size: i64,
15}
16impl TryFrom<serde_json::Value> for GetEncodedResponseResult {
17 type Error = serde_json::Error;
18 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
19 serde_json::from_value(value)
20 }
21}
22#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
23pub struct DisableResult {}
24impl TryFrom<serde_json::Value> for DisableResult {
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 EnableResult {}
32impl TryFrom<serde_json::Value> for EnableResult {
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 CheckContrastResult {}
40impl TryFrom<serde_json::Value> for CheckContrastResult {
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, Serialize, Deserialize)]
47pub struct CheckFormsIssuesResult {
48 #[serde(rename = "formIssues")]
49 #[serde(skip_serializing_if = "Vec::is_empty")]
50 pub form_issues: Vec<super::types::GenericIssueDetails>,
51}
52impl TryFrom<serde_json::Value> for CheckFormsIssuesResult {
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}