Skip to main content

ChromeFetchParams

Struct ChromeFetchParams 

Source
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>,
}
Available on crate feature 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: bool

When 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: bool

When 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>

Source

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.

Source

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>

Source§

fn clone(&self) -> ChromeFetchParams<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more