pub struct CaptureScreenshotBuilder { /* private fields */ }Expand description
Builder for CaptureScreenshot.
Implementations§
Source§impl CaptureScreenshotBuilder
impl CaptureScreenshotBuilder
Sourcepub fn format<VALUE: Into<CaptureScreenshotFormatOption>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn format<VALUE: Into<CaptureScreenshotFormatOption>>( &mut self, value: VALUE, ) -> &mut Self
Image compression format (defaults to png).
Sourcepub fn quality<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
pub fn quality<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
Compression quality from range [0..100] (jpeg only).
Sourcepub fn clip<VALUE: Into<Viewport>>(&mut self, value: VALUE) -> &mut Self
pub fn clip<VALUE: Into<Viewport>>(&mut self, value: VALUE) -> &mut Self
Capture the screenshot of a given region only.
Sourcepub fn from_surface<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn from_surface<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Capture the screenshot from the surface, rather than the view. Defaults to true.
Sourcepub fn capture_beyond_viewport<VALUE: Into<bool>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn capture_beyond_viewport<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self
Capture the screenshot beyond the viewport. Defaults to false.
Sourcepub fn optimize_for_speed<VALUE: Into<bool>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn optimize_for_speed<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self
Optimize image encoding for speed, not for resulting size (defaults to false)
Sourcepub fn build(&self) -> Result<CaptureScreenshot, CaptureScreenshotBuilderError>
pub fn build(&self) -> Result<CaptureScreenshot, CaptureScreenshotBuilderError>
Trait Implementations§
Source§impl Clone for CaptureScreenshotBuilder
impl Clone for CaptureScreenshotBuilder
Source§fn clone(&self) -> CaptureScreenshotBuilder
fn clone(&self) -> CaptureScreenshotBuilder
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 Freeze for CaptureScreenshotBuilder
impl RefUnwindSafe for CaptureScreenshotBuilder
impl Send for CaptureScreenshotBuilder
impl Sync for CaptureScreenshotBuilder
impl Unpin for CaptureScreenshotBuilder
impl UnsafeUnpin for CaptureScreenshotBuilder
impl UnwindSafe for CaptureScreenshotBuilder
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