pub struct ChromeFetchParams<'a> {Show 17 fields
pub wait_for: &'a Option<WaitFor>,
pub screenshot: &'a Option<ScreenShotConfig>,
pub openai_config: &'a Option<Box<GPTConfigs>>,
pub execution_scripts: &'a Option<ExecutionScripts>,
pub automation_scripts: &'a Option<AutomationScripts>,
pub viewport: &'a Option<Viewport>,
pub request_timeout: &'a Option<Duration>,
pub track_events: &'a Option<ChromeEventTracker>,
pub cache_policy: &'a Option<BasicCachePolicy>,
pub remote_multimodal: &'a Option<Box<RemoteMultimodalConfigs>>,
pub remote_cache_read_only: bool,
pub remote_cache_main_doc_only: bool,
pub first_byte_timeout: &'a Option<Duration>,
pub first_byte_timeout_jitter: &'a Option<Duration>,
pub browser_dead: Option<&'a Arc<AtomicBool>>,
pub chrome_failover: Option<&'a LazyChromeFailover>,
pub chrome_endpoint_url: Option<&'a str>,
}chrome only.Expand description
Borrowed parameter bundle for chrome fetch/page methods.
Collapses ten &Option<T> references that otherwise spill across
the ABI into one pointer, letting rustc inline the hot fetch
pipeline. All fields borrow from a longer-lived Configuration
(or locals at the call site) — zero copies, zero allocations.
Fields§
§wait_for: &'a Option<WaitFor>Wait-for conditions applied after navigation.
screenshot: &'a Option<ScreenShotConfig>Screenshot configuration, if any.
openai_config: &'a Option<Box<GPTConfigs>>OpenAI configuration for content extraction.
execution_scripts: &'a Option<ExecutionScripts>Per-URL execution scripts trie.
automation_scripts: &'a Option<AutomationScripts>Per-URL automation scripts trie.
viewport: &'a Option<Viewport>Viewport used for mouse/smart movement and CDP emulation.
request_timeout: &'a Option<Duration>Per-request timeout; caps chrome wall time.
track_events: &'a Option<ChromeEventTracker>CDP event tracking toggles.
cache_policy: &'a Option<BasicCachePolicy>Disk/remote cache policy.
remote_multimodal: &'a Option<Box<RemoteMultimodalConfigs>>Remote multimodal automation configuration.
remote_cache_read_only: boolWhen true, the remote Chrome cache is read-only: local + session
cache serve hits but no responses are uploaded to the remote
hybrid_cache_server. Only meaningful when chrome_remote_cache is
enabled; ignored otherwise (including no-op at the chromey call site
under other feature combinations). Always present so callers don’t
have to cfg-gate the field at construction sites.
remote_cache_main_doc_only: boolWhen true, only the main (initial) document is published to
the remote chrome cache. The per-response listener still
populates the local + per-session cache for sub-resources
(CSS/JS/manifests) but never uploads them.
cache_chrome_response continues to publish the navigated
document body — whatever MIME type it is. Orthogonal to
remote_cache_read_only: read-only suppresses everything, this
flag only suppresses the asset path. Only meaningful when
chrome_remote_cache is enabled; ignored otherwise.
first_byte_timeout: &'a Option<Duration>First-byte watchdog timeout — borrowed from Configuration.
None (default) disables the watchdog; the legacy chunk-idle
timeout still applies. Some(d) arms the watchdog inside the
chrome event-listener block.
first_byte_timeout_jitter: &'a Option<Duration>Per-fetch jitter window for the first-byte watchdog — borrowed
from Configuration. None = no jitter; Some(j) adds a
uniform random offset in [0, j) per fetch. Ignored when
first_byte_timeout is None.
browser_dead: Option<&'a Arc<AtomicBool>>Optional browser_dead signal flipped on first-byte timeout.
None (default) means “detect and force-stop only” — the watchdog
still fires but the AtomicBool is not set. Plumbed through by call
sites that have access to a BrowserController. Borrowed pointer to
avoid Arc clone overhead at construction; the watchdog clones the
inner Arc once if it needs to outlive a spawned future.
chrome_failover: Option<&'a LazyChromeFailover>Optional handle to the lazy chrome failover. When Some together
with chrome_endpoint_url, the first-byte watchdog calls
mark_url_bad on the failover so subsequent
setup_browser_configuration calls skip the dead URL during the
cooldown. Wired automatically from Configuration::chrome_fetch_params
— when no multi-endpoint failover is configured the borrowed
LazyChromeFailover is empty (uninit OnceLock) and mark_url_bad
is a no-op.
chrome_endpoint_url: Option<&'a str>Optional connected chrome endpoint URL. Set by macros / call sites
that have access to a BrowserController.connected_url. The
first-byte watchdog passes this URL to
LazyChromeFailover::mark_url_bad on timeout.
Implementations§
Source§impl<'a> ChromeFetchParams<'a>
impl<'a> ChromeFetchParams<'a>
Sourcepub fn with_browser_dead(self, dead: &'a Arc<AtomicBool>) -> Self
pub fn with_browser_dead(self, dead: &'a Arc<AtomicBool>) -> Self
Attach a borrowed browser_dead flag so a first-byte timeout can
signal the website-level retry loop to rotate the chrome backend.
Builder-style: returns the params with the field overridden.
Sourcepub fn with_chrome_endpoint(self, url: Option<&'a str>) -> Self
pub fn with_chrome_endpoint(self, url: Option<&'a str>) -> Self
Attach the connected chrome endpoint URL so the first-byte
watchdog can mark it bad on timeout. Pass None to leave it
unset (default). Builder-style.
Trait Implementations§
Source§impl<'a> Clone for ChromeFetchParams<'a>
impl<'a> Clone for ChromeFetchParams<'a>
Source§fn clone(&self) -> ChromeFetchParams<'a>
fn clone(&self) -> ChromeFetchParams<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a> Copy for ChromeFetchParams<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ChromeFetchParams<'a>
impl<'a> !UnwindSafe for ChromeFetchParams<'a>
impl<'a> Freeze for ChromeFetchParams<'a>
impl<'a> Send for ChromeFetchParams<'a>
impl<'a> Sync for ChromeFetchParams<'a>
impl<'a> Unpin for ChromeFetchParams<'a>
impl<'a> UnsafeUnpin for ChromeFetchParams<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more