pub struct LaunchOptions {
pub headless: bool,
pub chrome_path: Option<PathBuf>,
pub window_width: u32,
pub window_height: u32,
pub user_data_dir: Option<PathBuf>,
pub sandbox: bool,
pub launch_timeout: u64,
}Expand description
Options for launching a new browser instance
Fields§
§headless: boolWhether to run browser in headless mode (default: true)
chrome_path: Option<PathBuf>Custom Chrome/Chromium binary path
window_width: u32Browser window width (default: 1280)
window_height: u32Browser window height (default: 720)
user_data_dir: Option<PathBuf>User data directory for browser profile
sandbox: boolEnable sandbox mode (default: true)
launch_timeout: u64Timeout for browser launch in milliseconds (default: 30000)
Implementations§
Source§impl LaunchOptions
impl LaunchOptions
Sourcepub fn chrome_path(self, path: PathBuf) -> Self
pub fn chrome_path(self, path: PathBuf) -> Self
Builder method: set Chrome binary path
Sourcepub fn window_size(self, width: u32, height: u32) -> Self
pub fn window_size(self, width: u32, height: u32) -> Self
Builder method: set window dimensions
Sourcepub fn user_data_dir(self, dir: PathBuf) -> Self
pub fn user_data_dir(self, dir: PathBuf) -> Self
Builder method: set user data directory
Sourcepub fn launch_timeout(self, timeout_ms: u64) -> Self
pub fn launch_timeout(self, timeout_ms: u64) -> Self
Builder method: set launch timeout
Trait Implementations§
Source§impl Clone for LaunchOptions
impl Clone for LaunchOptions
Source§fn clone(&self) -> LaunchOptions
fn clone(&self) -> LaunchOptions
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 LaunchOptions
impl Debug for LaunchOptions
Auto Trait Implementations§
impl Freeze for LaunchOptions
impl RefUnwindSafe for LaunchOptions
impl Send for LaunchOptions
impl Sync for LaunchOptions
impl Unpin for LaunchOptions
impl UnwindSafe for LaunchOptions
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