pub struct FirefoxOptions {
pub headless: bool,
pub window_size: Option<(u32, u32)>,
pub kiosk: bool,
pub devtools: bool,
pub private: bool,
pub extra_args: Vec<String>,
}Expand description
Firefox process configuration options.
Controls how Firefox is launched, including display mode, window dimensions, and additional command-line arguments.
Fields§
§headless: boolRun Firefox without a GUI (headless mode).
window_size: Option<(u32, u32)>Window dimensions in pixels (width, height).
kiosk: boolEnable kiosk mode (fullscreen with restricted UI).
devtools: boolOpen Developer Tools on startup.
private: boolOpen a private browsing window.
extra_args: Vec<String>Additional custom command-line arguments.
Implementations§
Source§impl FirefoxOptions
impl FirefoxOptions
Sourcepub fn with_headless(self) -> Self
pub fn with_headless(self) -> Self
Enables headless mode.
Sourcepub fn with_window_size(self, width: u32, height: u32) -> Self
pub fn with_window_size(self, width: u32, height: u32) -> Self
Sets window size in pixels.
Sourcepub fn with_kiosk(self) -> Self
pub fn with_kiosk(self) -> Self
Enables kiosk mode.
Sourcepub fn with_devtools(self) -> Self
pub fn with_devtools(self) -> Self
Enables developer tools on startup.
Sourcepub fn with_private(self) -> Self
pub fn with_private(self) -> Self
Enables private browsing mode.
Sourcepub fn with_args(
self,
args: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn with_args( self, args: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Adds multiple custom command-line arguments.
Source§impl FirefoxOptions
impl FirefoxOptions
Trait Implementations§
Source§impl Clone for FirefoxOptions
impl Clone for FirefoxOptions
Source§fn clone(&self) -> FirefoxOptions
fn clone(&self) -> FirefoxOptions
Returns a duplicate 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 FirefoxOptions
impl Debug for FirefoxOptions
Source§impl Default for FirefoxOptions
impl Default for FirefoxOptions
Source§fn default() -> FirefoxOptions
fn default() -> FirefoxOptions
Returns the “default value” for a type. Read more
Source§impl PartialEq for FirefoxOptions
impl PartialEq for FirefoxOptions
impl Eq for FirefoxOptions
impl StructuralPartialEq for FirefoxOptions
Auto Trait Implementations§
impl Freeze for FirefoxOptions
impl RefUnwindSafe for FirefoxOptions
impl Send for FirefoxOptions
impl Sync for FirefoxOptions
impl Unpin for FirefoxOptions
impl UnwindSafe for FirefoxOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.