pub struct SetDeviceMetricsOverrideBuilder { /* private fields */ }Expand description
Builder for SetDeviceMetricsOverride.
Implementations§
Source§impl SetDeviceMetricsOverrideBuilder
impl SetDeviceMetricsOverrideBuilder
Sourcepub fn width<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
pub fn width<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
Sourcepub fn height<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
pub fn height<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
Sourcepub fn device_scale_factor<VALUE: Into<JsFloat>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn device_scale_factor<VALUE: Into<JsFloat>>( &mut self, value: VALUE, ) -> &mut Self
Overriding device scale factor value. 0 disables the override.
Sourcepub fn mobile<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn mobile<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.
Sourcepub fn scale<VALUE: Into<JsFloat>>(&mut self, value: VALUE) -> &mut Self
pub fn scale<VALUE: Into<JsFloat>>(&mut self, value: VALUE) -> &mut Self
Scale to apply to resulting view image.
Sourcepub fn screen_width<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
pub fn screen_width<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
Overriding screen width value in pixels (minimum 0, maximum 10000000).
Sourcepub fn screen_height<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
pub fn screen_height<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
Overriding screen height value in pixels (minimum 0, maximum 10000000).
Sourcepub fn position_x<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
pub fn position_x<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
Sourcepub fn position_y<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
pub fn position_y<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
Sourcepub fn dont_set_visible_size<VALUE: Into<bool>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn dont_set_visible_size<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self
Do not set visible view size, rely upon explicit setVisibleSize call.
Sourcepub fn screen_orientation<VALUE: Into<ScreenOrientation>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn screen_orientation<VALUE: Into<ScreenOrientation>>( &mut self, value: VALUE, ) -> &mut Self
Screen orientation override.
Sourcepub fn viewport<VALUE: Into<Viewport>>(&mut self, value: VALUE) -> &mut Self
pub fn viewport<VALUE: Into<Viewport>>(&mut self, value: VALUE) -> &mut Self
If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.
Sourcepub fn display_feature<VALUE: Into<DisplayFeature>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn display_feature<VALUE: Into<DisplayFeature>>( &mut self, value: VALUE, ) -> &mut Self
If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off. Deprecated, use Emulation.setDisplayFeaturesOverride.
Sourcepub fn device_posture<VALUE: Into<DevicePosture>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn device_posture<VALUE: Into<DevicePosture>>( &mut self, value: VALUE, ) -> &mut Self
If set, the posture of a foldable device. If not set the posture is set to continuous. Deprecated, use Emulation.setDevicePostureOverride.
Sourcepub fn build(
&self,
) -> Result<SetDeviceMetricsOverride, SetDeviceMetricsOverrideBuilderError>
pub fn build( &self, ) -> Result<SetDeviceMetricsOverride, SetDeviceMetricsOverrideBuilderError>
Trait Implementations§
Source§impl Clone for SetDeviceMetricsOverrideBuilder
impl Clone for SetDeviceMetricsOverrideBuilder
Source§fn clone(&self) -> SetDeviceMetricsOverrideBuilder
fn clone(&self) -> SetDeviceMetricsOverrideBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more