pub struct ScreenshotConfigBuilder { /* private fields */ }Expand description
Builder for ScreenshotConfig.
Implementations§
Source§impl ScreenshotConfigBuilder
impl ScreenshotConfigBuilder
Sourcepub fn format(self, f: ScreenshotFormat) -> Self
pub fn format(self, f: ScreenshotFormat) -> Self
Set output format.
Sourcepub fn resolution(self, r: impl Into<String>) -> Self
pub fn resolution(self, r: impl Into<String>) -> Self
Set viewport resolution.
Sourcepub fn rendering_wait(self, t: u32) -> Self
pub fn rendering_wait(self, t: u32) -> Self
Set rendering wait (ms).
Sourcepub fn wait_for_selector(self, s: impl Into<String>) -> Self
pub fn wait_for_selector(self, s: impl Into<String>) -> Self
Set wait-for-selector.
Sourcepub fn option(self, o: ScreenshotOption) -> Self
pub fn option(self, o: ScreenshotOption) -> Self
Add a capture option.
Sourcepub fn auto_scroll(self, v: bool) -> Self
pub fn auto_scroll(self, v: bool) -> Self
Enable auto-scroll.
Sourcepub fn cache_clear(self, v: bool) -> Self
pub fn cache_clear(self, v: bool) -> Self
Force cache refresh.
Sourcepub fn vision_deficiency(self, v: VisionDeficiencyType) -> Self
pub fn vision_deficiency(self, v: VisionDeficiencyType) -> Self
Set vision deficiency simulation.
Sourcepub fn build(self) -> Result<ScreenshotConfig, ScrapflyError>
pub fn build(self) -> Result<ScreenshotConfig, ScrapflyError>
Finalize the builder.
Trait Implementations§
Source§impl Clone for ScreenshotConfigBuilder
impl Clone for ScreenshotConfigBuilder
Source§fn clone(&self) -> ScreenshotConfigBuilder
fn clone(&self) -> ScreenshotConfigBuilder
Returns a copy 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 ScreenshotConfigBuilder
impl RefUnwindSafe for ScreenshotConfigBuilder
impl Send for ScreenshotConfigBuilder
impl Sync for ScreenshotConfigBuilder
impl Unpin for ScreenshotConfigBuilder
impl UnwindSafe for ScreenshotConfigBuilder
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