pub struct DeviceDescriptor {
pub name: &'static str,
pub viewport_width: u32,
pub viewport_height: u32,
pub device_scale_factor: f64,
pub is_mobile: bool,
pub has_touch: bool,
pub user_agent: &'static str,
}Expand description
Mobile device descriptor for emulation
Fields§
§name: &'static strDevice name
viewport_width: u32Viewport width
viewport_height: u32Viewport height
device_scale_factor: f64Device scale factor
is_mobile: boolIs mobile device
has_touch: boolHas touch support
user_agent: &'static strDefault user agent
Implementations§
Source§impl DeviceDescriptor
impl DeviceDescriptor
Sourcepub const IPHONE_14_PRO: Self
pub const IPHONE_14_PRO: Self
iPhone 14 Pro
Sourcepub const IPAD_PRO_12_9: Self
pub const IPAD_PRO_12_9: Self
iPad Pro 12.9
Sourcepub const DESKTOP_1080P: Self
pub const DESKTOP_1080P: Self
Desktop 1080p
Sourcepub const DESKTOP_4K: Self
pub const DESKTOP_4K: Self
Desktop 4K
Sourcepub fn to_config(&self) -> DriverConfig
pub fn to_config(&self) -> DriverConfig
Convert to driver config
Trait Implementations§
Source§impl Clone for DeviceDescriptor
impl Clone for DeviceDescriptor
Source§fn clone(&self) -> DeviceDescriptor
fn clone(&self) -> DeviceDescriptor
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 DeviceDescriptor
impl RefUnwindSafe for DeviceDescriptor
impl Send for DeviceDescriptor
impl Sync for DeviceDescriptor
impl Unpin for DeviceDescriptor
impl UnsafeUnpin for DeviceDescriptor
impl UnwindSafe for DeviceDescriptor
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