Struct cdp::page::SetDeviceMetricsOverrideCommand
[−]
[src]
pub struct SetDeviceMetricsOverrideCommand { pub width: i32, pub height: i32, pub device_scale_factor: f64, pub mobile: bool, pub scale: Option<f64>, pub screen_width: Option<i32>, pub screen_height: Option<i32>, pub position_x: Option<i32>, pub position_y: Option<i32>, pub dont_set_visible_size: Option<bool>, pub screen_orientation: Option<ScreenOrientation>, }
[Experimental] Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results).
Command Page.setDeviceMetricsOverride
Domain Module: cdp::page
Command Struct: cdp::page::SetDeviceMetricsOverrideCommand
Response Struct: cdp::page::SetDeviceMetricsOverrideResponse
Fields
width: i32
Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
height: i32
Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
device_scale_factor: f64
Overriding device scale factor value. 0 disables the override.
mobile: bool
Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.
scale: Option<f64>
Scale to apply to resulting view image. Ignored in |fitWindow| mode.
screen_width: Option<i32>
Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|.
screen_height: Option<i32>
Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|.
position_x: Option<i32>
Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|.
position_y: Option<i32>
Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|.
dont_set_visible_size: Option<bool>
Do not set visible view size, rely upon explicit setVisibleSize call.
screen_orientation: Option<ScreenOrientation>
Screen orientation override.
Trait Implementations
impl Clone for SetDeviceMetricsOverrideCommand
[src]
fn clone(&self) -> SetDeviceMetricsOverrideCommand
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for SetDeviceMetricsOverrideCommand
[src]
impl PartialEq for SetDeviceMetricsOverrideCommand
[src]
fn eq(&self, __arg_0: &SetDeviceMetricsOverrideCommand) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SetDeviceMetricsOverrideCommand) -> bool
[src]
This method tests for !=
.
impl CdpCommand for SetDeviceMetricsOverrideCommand
[src]
const COMMAND_NAME: &'static str
COMMAND_NAME: &'static str = "Page.setDeviceMetricsOverride"
impl SerializeCdpCommand for SetDeviceMetricsOverrideCommand
[src]
fn command_name(&self) -> &str
[src]
fn serialize_command_params<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
S: Serializer,
impl<'de> DeserializeCdpCommand<'de> for SetDeviceMetricsOverrideCommand
[src]
fn deserialize_command<D>(
name: &str,
params: D
) -> Result<Result<Self, D::Error>, D> where
D: Deserializer<'de>,
[src]
name: &str,
params: D
) -> Result<Result<Self, D::Error>, D> where
D: Deserializer<'de>,