pub struct Device {
pub id: String,
pub label: String,
pub output_width: u32,
pub output_height: u32,
pub scale: u32,
pub mobile: bool,
pub platform: Platform,
pub store: Store,
pub requirement: Requirement,
pub verified: bool,
pub source: String,
}Expand description
One capture target.
Fields§
§id: StringStable identifier, used in filenames and receipts.
label: StringHuman label for reports.
output_width: u32Required output width in real pixels.
output_height: u32Required output height in real pixels.
scale: u32Device pixel ratio the page renders at.
mobile: boolEmulate a mobile viewport.
platform: PlatformWhat platform to emulate: User-Agent, Client Hints and touch points. Without this, a desktop UA is sent and UA-sniffing sites return their desktop layout regardless of the viewport size.
store: Store§requirement: Requirement§verified: boolTrue only when the numbers were read from official documentation.
source: StringThe documentation URL the numbers came from.
Implementations§
Source§impl Device
impl Device
Sourcepub fn viewport(&self) -> (u32, u32)
pub fn viewport(&self) -> (u32, u32)
The CSS-pixel viewport to drive the browser with.
Exact by construction: parse_presets rejects any preset where this
division would not be exact.
Sourcepub fn output_size(&self) -> (u32, u32)
pub fn output_size(&self) -> (u32, u32)
The pixel dimensions the captured image must have.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Device
impl<'de> Deserialize<'de> for Device
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Device
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnsafeUnpin for Device
impl UnwindSafe for Device
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