pub struct ScreenshotOptions {
pub omit_background: bool,
pub format: ScreenshotFormat,
pub clip: Option<ScreenshotClip>,
pub scale: Option<f64>,
}Expand description
Screenshot options for BrowserPage::screenshot_with. The default is the viewport as PNG.
Fields§
§omit_background: boolCapture with a transparent background (PNG only). Pair with
BrowserPage::set_transparent_background for a fully transparent page.
format: ScreenshotFormatImage format; PNG by default.
clip: Option<ScreenshotClip>Capture only this region, in CSS pixels of the page. None captures the visible viewport
(or, with a scale, the whole visual viewport).
scale: Option<f64>Output scale of the capture, a positive finite factor (1.0 when None). Use it with
clip or alone to produce a smaller image, for example a 1280 px wide frame of a wider
viewport.
Trait Implementations§
Source§impl Clone for ScreenshotOptions
impl Clone for ScreenshotOptions
impl Copy for ScreenshotOptions
Source§impl Debug for ScreenshotOptions
impl Debug for ScreenshotOptions
Source§impl Default for ScreenshotOptions
impl Default for ScreenshotOptions
Source§impl PartialEq for ScreenshotOptions
impl PartialEq for ScreenshotOptions
impl StructuralPartialEq for ScreenshotOptions
Auto Trait Implementations§
impl Freeze for ScreenshotOptions
impl RefUnwindSafe for ScreenshotOptions
impl Send for ScreenshotOptions
impl Sync for ScreenshotOptions
impl Unpin for ScreenshotOptions
impl UnsafeUnpin for ScreenshotOptions
impl UnwindSafe for ScreenshotOptions
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