pub enum BatchOutcome {
Scrape(ScrapeResult),
Proxified(BatchProxifiedResponse),
Err(ScrapflyError),
}Expand description
Per-part outcome yielded by Client::scrape_batch.
NOTE on clippy::large_enum_variant: the Scrape(ScrapeResult) variant is
~528 bytes vs. ~120 bytes for the others. Boxing to shrink it would be a
breaking change to v0.2.x consumers pattern-matching on BatchOutcome::Scrape.
We accept the unbalanced size — each enum instance is ephemeral (yielded
once per batch part via a stream) and count tops out at the batch size.
Variants§
Scrape(ScrapeResult)
Standard per-part scrape result (JSON envelope decoded).
Proxified(BatchProxifiedResponse)
Proxified part: the upstream’s raw response, with status +
headers + body restored from the multipart part metadata.
Surfaces when the originating ScrapeConfig.proxified_response == true. Matches the single-scrape scrape_proxified()
return shape as closely as we can without a live connection.
Err(ScrapflyError)
Per-part error (decode failure, per-scrape upstream error, etc.).