pub struct ViewportSpec {
pub width: i32,
pub height: i32,
pub device_scale_factor: f64,
pub mobile: bool,
pub has_touch: bool,
pub is_landscape: bool,
}Expand description
Parsed viewport string: WxHxDPR[,mobile][,touch][,landscape].
Fields§
§width: i32CSS width in pixels.
height: i32CSS height in pixels.
device_scale_factor: f64Device pixel ratio.
mobile: boolMobile metric emulation.
has_touch: boolTouch support flag.
is_landscape: boolLandscape orientation flag.
Trait Implementations§
Source§impl Clone for ViewportSpec
impl Clone for ViewportSpec
Source§fn clone(&self) -> ViewportSpec
fn clone(&self) -> ViewportSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ViewportSpec
impl Debug for ViewportSpec
Source§impl PartialEq for ViewportSpec
impl PartialEq for ViewportSpec
impl StructuralPartialEq for ViewportSpec
Auto Trait Implementations§
impl Freeze for ViewportSpec
impl RefUnwindSafe for ViewportSpec
impl Send for ViewportSpec
impl Sync for ViewportSpec
impl Unpin for ViewportSpec
impl UnsafeUnpin for ViewportSpec
impl UnwindSafe for ViewportSpec
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