pub struct SetDeviceMetricsOverride { /* private fields */ }Expand description
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).
Implementations§
Source§impl SetDeviceMetricsOverride
impl SetDeviceMetricsOverride
pub fn new( width: impl Into<i64>, height: impl Into<i64>, device_scale_factor: impl Into<f64>, mobile: impl Into<bool>, ) -> Self
pub fn with_scale(self, scale: impl Into<f64>) -> Self
pub fn with_screen_width(self, screen_width: impl Into<i64>) -> Self
pub fn with_screen_height(self, screen_height: impl Into<i64>) -> Self
pub fn with_position_x(self, position_x: impl Into<i64>) -> Self
pub fn with_position_y(self, position_y: impl Into<i64>) -> Self
pub fn with_dont_set_visible_size( self, dont_set_visible_size: impl Into<bool>, ) -> Self
pub fn with_screen_orientation( self, screen_orientation: impl Into<ScreenOrientation>, ) -> Self
pub fn with_viewport(self, viewport: impl Into<Viewport>) -> Self
pub fn with_display_feature( self, display_feature: impl Into<DisplayFeature>, ) -> Self
pub fn with_device_posture( self, device_posture: impl Into<DevicePosture>, ) -> Self
Trait Implementations§
Source§impl Clone for SetDeviceMetricsOverride
impl Clone for SetDeviceMetricsOverride
Source§fn clone(&self) -> SetDeviceMetricsOverride
fn clone(&self) -> SetDeviceMetricsOverride
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 moreSource§impl Command for SetDeviceMetricsOverride
impl Command for SetDeviceMetricsOverride
Source§impl Debug for SetDeviceMetricsOverride
impl Debug for SetDeviceMetricsOverride
Auto Trait Implementations§
impl Freeze for SetDeviceMetricsOverride
impl RefUnwindSafe for SetDeviceMetricsOverride
impl Send for SetDeviceMetricsOverride
impl Sync for SetDeviceMetricsOverride
impl Unpin for SetDeviceMetricsOverride
impl UnwindSafe for SetDeviceMetricsOverride
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