pub struct SetDeviceMetricsOverrideParams {Show 14 fields
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>,
pub viewport: Option<Viewport>,
pub display_feature: Option<DisplayFeature>,
pub device_posture: Option<DevicePosture>,
}Expand description
Parameters for Emulation.setDeviceMetricsOverride.
Fields§
§width: i32Overriding width value in pixels (0 disables override).
height: i32Overriding height value in pixels (0 disables override).
device_scale_factor: f64Overriding device scale factor value (0 disables override).
mobile: boolWhether to emulate mobile device.
scale: Option<f64>Scale to apply to resulting view image.
screen_width: Option<i32>Overriding screen width value in pixels.
screen_height: Option<i32>Overriding screen height value in pixels.
position_x: Option<i32>Overriding view X position on screen in pixels.
position_y: Option<i32>Overriding view Y position on screen in pixels.
dont_set_visible_size: Option<bool>Do not set visible view size, rely upon explicit setVisibleSize call.
screen_orientation: Option<ScreenOrientation>Screen orientation override.
viewport: Option<Viewport>The viewport dimensions and scale.
display_feature: Option<DisplayFeature>Display feature for foldable devices.
device_posture: Option<DevicePosture>Device posture for foldable devices.
Trait Implementations§
Source§impl Clone for SetDeviceMetricsOverrideParams
impl Clone for SetDeviceMetricsOverrideParams
Source§fn clone(&self) -> SetDeviceMetricsOverrideParams
fn clone(&self) -> SetDeviceMetricsOverrideParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SetDeviceMetricsOverrideParams
impl RefUnwindSafe for SetDeviceMetricsOverrideParams
impl Send for SetDeviceMetricsOverrideParams
impl Sync for SetDeviceMetricsOverrideParams
impl Unpin for SetDeviceMetricsOverrideParams
impl UnwindSafe for SetDeviceMetricsOverrideParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more