Skip to main content

cdp_driver/protocol/
device_orientation.rs

1// @generated by `just generate-methods` from protocol/*.json.
2// Do not edit by hand; edit xtask/ and regenerate.
3
4//! The `DeviceOrientation` domain.
5//!
6//! Types, command parameters and event payloads for the `DeviceOrientation`
7//! domain. The method-name constants for the same domain are in
8//! [`crate::methods`].
9//!
10//! This domain is experimental and may change without notice.
11
12use serde::{Deserialize, Serialize};
13
14/// Clears the overridden Device Orientation.
15///
16/// Parameters of `DeviceOrientation.clearDeviceOrientationOverride`.
17#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
18pub struct ClearDeviceOrientationOverrideParams {}
19
20impl crate::typed::Command for ClearDeviceOrientationOverrideParams {
21    const METHOD: &'static str = "DeviceOrientation.clearDeviceOrientationOverride";
22    type Returns = crate::typed::NoReturns;
23}
24
25/// Overrides the Device Orientation.
26///
27/// Parameters of `DeviceOrientation.setDeviceOrientationOverride`.
28#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
29pub struct SetDeviceOrientationOverrideParams {
30    /// Mock alpha
31    pub alpha: f64,
32    /// Mock beta
33    pub beta: f64,
34    /// Mock gamma
35    pub gamma: f64,
36}
37
38impl crate::typed::Command for SetDeviceOrientationOverrideParams {
39    const METHOD: &'static str = "DeviceOrientation.setDeviceOrientationOverride";
40    type Returns = crate::typed::NoReturns;
41}