pub struct Viewport { /* private fields */ }Expand description
Viewport for capturing screenshot.
Implementations§
Source§impl Viewport
impl Viewport
Sourcepub fn builder(
x: f64,
y: f64,
width: f64,
height: f64,
scale: f64,
) -> ViewportBuilder
pub fn builder( x: f64, y: f64, width: f64, height: f64, scale: f64, ) -> ViewportBuilder
Creates a builder for this type with the required parameters:
x: X offset in device independent pixels (dip).y: Y offset in device independent pixels (dip).width: Rectangle width in device independent pixels (dip).height: Rectangle height in device independent pixels (dip).scale: Page scale factor.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Viewport
impl<'de> Deserialize<'de> for Viewport
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
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