pub struct BrowserConfig {
pub headless: bool,
pub viewport_width: u32,
pub viewport_height: u32,
pub chromium_path: Option<String>,
pub debug_port: u16,
pub user_agent: Option<String>,
pub devtools: bool,
pub sandbox: bool,
pub tracing_config: Option<TracingConfig>,
}Expand description
Browser configuration
Fields§
§headless: boolRun in headless mode
viewport_width: u32Viewport width
viewport_height: u32Viewport height
chromium_path: Option<String>Path to chromium binary (None = auto-detect)
debug_port: u16Remote debugging port (0 = auto-assign)
user_agent: Option<String>User agent string
devtools: boolEnable DevTools
sandbox: boolSandbox mode (disable for containers)
tracing_config: Option<TracingConfig>Renacer tracing configuration
Implementations§
Source§impl BrowserConfig
impl BrowserConfig
Sourcepub const fn with_viewport(self, width: u32, height: u32) -> Self
pub const fn with_viewport(self, width: u32, height: u32) -> Self
Set viewport dimensions
Sourcepub const fn with_headless(self, headless: bool) -> Self
pub const fn with_headless(self, headless: bool) -> Self
Set headless mode
Sourcepub fn with_chromium_path(self, path: impl Into<String>) -> Self
pub fn with_chromium_path(self, path: impl Into<String>) -> Self
Set chromium path
Sourcepub fn with_user_agent(self, ua: impl Into<String>) -> Self
pub fn with_user_agent(self, ua: impl Into<String>) -> Self
Set user agent
Sourcepub const fn with_no_sandbox(self) -> Self
pub const fn with_no_sandbox(self) -> Self
Disable sandbox (for containers/CI)
Sourcepub fn with_tracing(self, config: RenacerTracingConfig) -> Self
pub fn with_tracing(self, config: RenacerTracingConfig) -> Self
Enable renacer tracing
Sourcepub fn is_tracing_enabled(&self) -> bool
pub fn is_tracing_enabled(&self) -> bool
Check if tracing is enabled
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
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