pub struct ScreenshotBuilder<'a> { /* private fields */ }Expand description
Builder for capturing screenshots.
Implementations§
Source§impl<'a> ScreenshotBuilder<'a>
impl<'a> ScreenshotBuilder<'a>
Sourcepub fn jpeg(self, quality: Option<u8>) -> Self
pub fn jpeg(self, quality: Option<u8>) -> Self
Set the image format to JPEG with optional quality (0-100).
Sourcepub fn format(self, format: ScreenshotFormat) -> Self
pub fn format(self, format: ScreenshotFormat) -> Self
Set the image format.
Sourcepub fn quality(self, quality: u8) -> Self
pub fn quality(self, quality: u8) -> Self
Set the image quality (0-100, applicable to JPEG and WebP only).
Sourcepub fn full_page(self, full_page: bool) -> Self
pub fn full_page(self, full_page: bool) -> Self
Capture the full scrollable page instead of just the viewport.
Sourcepub fn clip(self, x: f64, y: f64, width: f64, height: f64) -> Self
pub fn clip(self, x: f64, y: f64, width: f64, height: f64) -> Self
Clip the screenshot to a specific region.
Sourcepub fn clip_region(self, region: ClipRegion) -> Self
pub fn clip_region(self, region: ClipRegion) -> Self
Clip the screenshot using a ClipRegion.
Sourcepub fn omit_background(self, omit: bool) -> Self
pub fn omit_background(self, omit: bool) -> Self
Set whether to omit the background (transparent). Note: Only applicable to PNG format.
Sourcepub fn animations(self, animations: Animations) -> Self
pub fn animations(self, animations: Animations) -> Self
Set animation handling.
Trait Implementations§
Source§impl<'a> Clone for ScreenshotBuilder<'a>
impl<'a> Clone for ScreenshotBuilder<'a>
Source§fn clone(&self) -> ScreenshotBuilder<'a>
fn clone(&self) -> ScreenshotBuilder<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for ScreenshotBuilder<'a>
impl<'a> !RefUnwindSafe for ScreenshotBuilder<'a>
impl<'a> Send for ScreenshotBuilder<'a>
impl<'a> Sync for ScreenshotBuilder<'a>
impl<'a> Unpin for ScreenshotBuilder<'a>
impl<'a> !UnwindSafe for ScreenshotBuilder<'a>
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