pub struct BrowserConfig {
pub chrome_path: Option<String>,
pub headless: bool,
pub remote_debugging_port: u16,
pub user_data_dir: Option<String>,
pub timeout_secs: u64,
pub viewport_width: u32,
pub viewport_height: u32,
}Expand description
Configuration for launching a browser instance.
Sensible defaults let a fighter step into the ring without fuss — headless Chrome on port 9222, 30-second timeout, standard viewport.
Fields§
§chrome_path: Option<String>Path to the Chrome/Chromium binary. None means auto-detect.
headless: boolRun headless (no visible window). Default: true.
remote_debugging_port: u16Remote debugging port for CDP. Default: 9222.
user_data_dir: Option<String>Custom user-data directory. None uses a temp directory.
timeout_secs: u64Per-action timeout in seconds. Default: 30.
viewport_width: u32Viewport width in pixels. Default: 1280.
viewport_height: u32Viewport height in pixels. Default: 720.
Trait Implementations§
Source§impl Clone for BrowserConfig
impl Clone for BrowserConfig
Source§fn clone(&self) -> BrowserConfig
fn clone(&self) -> BrowserConfig
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 BrowserConfig
impl Debug for BrowserConfig
Source§impl Default for BrowserConfig
impl Default for BrowserConfig
Source§impl<'de> Deserialize<'de> for BrowserConfig
impl<'de> Deserialize<'de> for BrowserConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&BrowserConfig> for CdpConfig
impl From<&BrowserConfig> for CdpConfig
Source§fn from(config: &BrowserConfig) -> Self
fn from(config: &BrowserConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BrowserConfig
impl RefUnwindSafe for BrowserConfig
impl Send for BrowserConfig
impl Sync for BrowserConfig
impl Unpin for BrowserConfig
impl UnsafeUnpin for BrowserConfig
impl UnwindSafe for BrowserConfig
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