pub struct FoxBrowserConfig {
pub executable_path: Option<String>,
pub profile_dir: Option<String>,
pub headless: bool,
pub viewport_width: u32,
pub viewport_height: u32,
pub user_agent: Option<String>,
pub user_js_content: Option<String>,
pub proxy: Option<ProxyConfig>,
pub unhandled_prompt_behavior: Option<String>,
pub env: Vec<(String, String)>,
}Fields§
§executable_path: Option<String>§profile_dir: Option<String>Firefox profile directory.
Supply a STABLE path to get a PERSISTENT persona: cookies, localStorage,
IndexedDB, and the per-identity device fingerprint (canvas/audio seed, when
launched via guise) all survive a restart that reuses the same path, a
returning logged-in user, not a brand-new browser each launch. Persistence
requires the session to end through Page::close, which performs the clean
browser.close shutdown that flushes Firefox’s QuotaManager storage to disk
(a bare SIGKILL would lose unflushed localStorage/IndexedDB).
None synthesizes a fresh temporary profile per launch, an ephemeral,
one-shot persona with no cross-launch state.
headless: bool§viewport_width: u32§viewport_height: u32§user_agent: Option<String>§user_js_content: Option<String>Raw user.js content to write into the profile directory before
Firefox starts. The caller (typically guise) is responsible for
building this string from profile overrides.
proxy: Option<ProxyConfig>Optional upstream proxy. Emitted as network.proxy.* prefs appended to
user_js_content at launch (requires profile_dir).
unhandled_prompt_behavior: Option<String>How Firefox handles JS user prompts (alert/confirm/prompt/
beforeunload). One of accept, dismiss, ignore, dismiss and notify. None keeps the BiDi default (dismiss and notify), which
never hangs and still emits the events the dialog log records. Set
ignore to keep prompts OPEN so Page::handle_user_prompt can answer
them; set accept to auto-accept (a confirm() guard returns true,
beforeunload never blocks navigation).
env: Vec<(String, String)>Extra environment variables to set on the spawned Firefox process, on top
of the inherited parent env. ONLY honored by launch_firefox_self_managed
(foxdriver owns that spawn); the rustenium-managed launch_firefox cannot
set per-process env. The canonical use is TZ=<IANA zone> so ICU reports the
persona timezone in EVERY realm, including dedicated Workers, which a
window-realm JS Intl/Date preload can never reach (a worker that read the
host zone while the window claimed the persona zone was a trivially-detected
leak). Per-process, so concurrent launches with different zones never race
(unlike mutating the parent process’s TZ).
Trait Implementations§
Source§impl Clone for FoxBrowserConfig
impl Clone for FoxBrowserConfig
Source§fn clone(&self) -> FoxBrowserConfig
fn clone(&self) -> FoxBrowserConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FoxBrowserConfig
impl Debug for FoxBrowserConfig
Source§impl Default for FoxBrowserConfig
impl Default for FoxBrowserConfig
Source§fn default() -> FoxBrowserConfig
fn default() -> FoxBrowserConfig
Auto Trait Implementations§
impl Freeze for FoxBrowserConfig
impl RefUnwindSafe for FoxBrowserConfig
impl Send for FoxBrowserConfig
impl Sync for FoxBrowserConfig
impl Unpin for FoxBrowserConfig
impl UnsafeUnpin for FoxBrowserConfig
impl UnwindSafe for FoxBrowserConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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