pub struct ScreenshotParamsBuilder { /* private fields */ }Expand description
Builder for ScreenshotParams.
Implementations§
Source§impl ScreenshotParamsBuilder
impl ScreenshotParamsBuilder
Sourcepub fn format<VALUE: Into<ScreenshotParamsFormat>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn format<VALUE: Into<ScreenshotParamsFormat>>( &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 and webp only).
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<ScreenshotParams, ScreenshotParamsBuilderError>
pub fn build(&self) -> Result<ScreenshotParams, ScreenshotParamsBuilderError>
Trait Implementations§
Source§impl Clone for ScreenshotParamsBuilder
impl Clone for ScreenshotParamsBuilder
Source§fn clone(&self) -> ScreenshotParamsBuilder
fn clone(&self) -> ScreenshotParamsBuilder
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 ScreenshotParamsBuilder
impl RefUnwindSafe for ScreenshotParamsBuilder
impl Send for ScreenshotParamsBuilder
impl Sync for ScreenshotParamsBuilder
impl Unpin for ScreenshotParamsBuilder
impl UnsafeUnpin for ScreenshotParamsBuilder
impl UnwindSafe for ScreenshotParamsBuilder
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