pub struct Viewport {
pub width: u32,
pub height: u32,
pub dpr: u32,
}Expand description
A viewport definition. Sizes are in CSS pixels; dpr is the
device-pixel ratio.
Fields§
§width: u32§height: u32§dpr: u32Implementations§
Source§impl Viewport
impl Viewport
pub const MOBILE_S: Self
pub const MOBILE: Self
pub const MOBILE_L: Self
pub const TABLET: Self
pub const TABLET_L: Self
pub const LAPTOP: Self
pub const DESKTOP: Self
pub const DESKTOP_XL: Self
pub const WIDE: Self
pub const fn new(width: u32, height: u32, dpr: u32) -> Self
Trait Implementations§
impl Copy for Viewport
impl Eq for Viewport
impl StructuralPartialEq for Viewport
Auto Trait Implementations§
impl Freeze for Viewport
impl RefUnwindSafe for Viewport
impl Send for Viewport
impl Sync for Viewport
impl Unpin for Viewport
impl UnsafeUnpin for Viewport
impl UnwindSafe for Viewport
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