pub struct ScreenshotConfig {Show 16 fields
pub url: String,
pub format: Option<ScreenshotFormat>,
pub capture: Option<String>,
pub resolution: Option<String>,
pub country: Option<String>,
pub timeout: Option<u32>,
pub rendering_wait: Option<u32>,
pub wait_for_selector: Option<String>,
pub options: Vec<ScreenshotOption>,
pub auto_scroll: bool,
pub js: Option<String>,
pub cache: bool,
pub cache_ttl: Option<u32>,
pub cache_clear: bool,
pub webhook: Option<String>,
pub vision_deficiency: Option<VisionDeficiencyType>,
}Expand description
Configuration for a POST /screenshot request.
Fields§
§url: StringTarget URL (required).
format: Option<ScreenshotFormat>Image format.
capture: Option<String>fullpage or a CSS selector.
resolution: Option<String>Viewport resolution (e.g. 1920x1080).
country: Option<String>Proxy country.
timeout: Option<u32>Timeout in milliseconds.
rendering_wait: Option<u32>Extra rendering wait (ms).
wait_for_selector: Option<String>Wait for CSS selector.
options: Vec<ScreenshotOption>Capture options.
auto_scroll: boolEnable auto-scroll.
js: Option<String>Custom JavaScript (base64url-encoded on the wire).
cache: boolEnable cache.
cache_ttl: Option<u32>Cache TTL (seconds).
cache_clear: boolForce cache refresh.
webhook: Option<String>Webhook name.
vision_deficiency: Option<VisionDeficiencyType>Simulated vision deficiency.
Implementations§
Source§impl ScreenshotConfig
impl ScreenshotConfig
Sourcepub fn builder(url: impl Into<String>) -> ScreenshotConfigBuilder
pub fn builder(url: impl Into<String>) -> ScreenshotConfigBuilder
Start a builder for url.
Sourcepub fn to_query_pairs(&self) -> Result<Vec<(String, String)>, ScrapflyError>
pub fn to_query_pairs(&self) -> Result<Vec<(String, String)>, ScrapflyError>
Serialize into query-param pairs. Mirrors toAPIParams in the Go SDK.
Trait Implementations§
Source§impl Clone for ScreenshotConfig
impl Clone for ScreenshotConfig
Source§fn clone(&self) -> ScreenshotConfig
fn clone(&self) -> ScreenshotConfig
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 moreSource§impl Debug for ScreenshotConfig
impl Debug for ScreenshotConfig
Source§impl Default for ScreenshotConfig
impl Default for ScreenshotConfig
Source§fn default() -> ScreenshotConfig
fn default() -> ScreenshotConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ScreenshotConfig
impl RefUnwindSafe for ScreenshotConfig
impl Send for ScreenshotConfig
impl Sync for ScreenshotConfig
impl Unpin for ScreenshotConfig
impl UnwindSafe for ScreenshotConfig
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