cdp-driver 0.5.0

Chrome DevTools Protocol (CDP) client for Rust: every command, event and type generated from the schema, with sessions, for browser automation and AI agents
Documentation
// @generated by `just generate-methods` from protocol/*.json.
// Do not edit by hand; edit xtask/ and regenerate.

//! The `DeviceOrientation` domain.
//!
//! Types, command parameters and event payloads for the `DeviceOrientation`
//! domain. The method-name constants for the same domain are in
//! [`crate::methods`].
//!
//! This domain is experimental and may change without notice.

use serde::{Deserialize, Serialize};

/// Clears the overridden Device Orientation.
///
/// Parameters of `DeviceOrientation.clearDeviceOrientationOverride`.
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ClearDeviceOrientationOverrideParams {}

impl crate::typed::Command for ClearDeviceOrientationOverrideParams {
    const METHOD: &'static str = "DeviceOrientation.clearDeviceOrientationOverride";
    type Returns = crate::typed::NoReturns;
}

/// Overrides the Device Orientation.
///
/// Parameters of `DeviceOrientation.setDeviceOrientationOverride`.
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetDeviceOrientationOverrideParams {
    /// Mock alpha
    pub alpha: f64,
    /// Mock beta
    pub beta: f64,
    /// Mock gamma
    pub gamma: f64,
}

impl crate::typed::Command for SetDeviceOrientationOverrideParams {
    const METHOD: &'static str = "DeviceOrientation.setDeviceOrientationOverride";
    type Returns = crate::typed::NoReturns;
}