Skip to main content

cdp_protocol/
device_orientation.rs

1// Auto-generated from Chrome at version 146.0.7680.165 domain: DeviceOrientation
2#![allow(dead_code)]
3#[allow(unused_imports)]
4use super::types::*;
5#[allow(unused_imports)]
6use derive_builder::Builder;
7#[allow(unused_imports)]
8use serde::{Deserialize, Serialize};
9#[allow(unused_imports)]
10use serde_json::Value as Json;
11#[allow(deprecated)]
12#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
13pub struct ClearDeviceOrientationOverride(pub Option<Json>);
14#[allow(deprecated)]
15#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Builder)]
16#[builder(setter(into, strip_option))]
17#[serde(rename_all = "camelCase")]
18#[doc = "Overrides the Device Orientation."]
19pub struct SetDeviceOrientationOverride {
20    #[serde(default)]
21    #[doc = "Mock alpha"]
22    pub alpha: JsFloat,
23    #[serde(default)]
24    #[doc = "Mock beta"]
25    pub beta: JsFloat,
26    #[serde(default)]
27    #[doc = "Mock gamma"]
28    pub gamma: JsFloat,
29}
30#[allow(deprecated)]
31#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
32#[doc = "Clears the overridden Device Orientation."]
33pub struct ClearDeviceOrientationOverrideReturnObject(pub Option<Json>);
34#[allow(deprecated)]
35#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
36#[doc = "Overrides the Device Orientation."]
37pub struct SetDeviceOrientationOverrideReturnObject(pub Option<Json>);
38#[allow(deprecated)]
39impl Method for ClearDeviceOrientationOverride {
40    const NAME: &'static str = "DeviceOrientation.clearDeviceOrientationOverride";
41    type ReturnObject = ClearDeviceOrientationOverrideReturnObject;
42}
43#[allow(deprecated)]
44impl Method for SetDeviceOrientationOverride {
45    const NAME: &'static str = "DeviceOrientation.setDeviceOrientationOverride";
46    type ReturnObject = SetDeviceOrientationOverrideReturnObject;
47}
48#[allow(dead_code)]
49pub mod events {
50    #[allow(unused_imports)]
51    use super::super::types::*;
52    #[allow(unused_imports)]
53    use derive_builder::Builder;
54    #[allow(unused_imports)]
55    use serde::{Deserialize, Serialize};
56    #[allow(unused_imports)]
57    use serde_json::Value as Json;
58}