pub struct DriverConfig {
pub headless: bool,
pub viewport_width: u32,
pub viewport_height: u32,
pub device_scale_factor: f64,
pub user_agent: Option<String>,
pub navigation_timeout: Duration,
pub element_timeout: Duration,
pub tracing: bool,
pub executable_path: Option<String>,
}Expand description
Browser configuration for driver
Fields§
§headless: boolRun in headless mode
viewport_width: u32Viewport width
viewport_height: u32Viewport height
device_scale_factor: f64Device scale factor
user_agent: Option<String>User agent string
Timeout for navigation
element_timeout: DurationTimeout for element queries
tracing: boolEnable tracing
executable_path: Option<String>Executable path override
Implementations§
Source§impl DriverConfig
impl DriverConfig
Sourcepub const fn scale_factor(self, factor: f64) -> Self
pub const fn scale_factor(self, factor: f64) -> Self
Set device scale factor
Sourcepub fn user_agent(self, ua: impl Into<String>) -> Self
pub fn user_agent(self, ua: impl Into<String>) -> Self
Set user agent
Set navigation timeout
Sourcepub const fn with_tracing(self, enabled: bool) -> Self
pub const fn with_tracing(self, enabled: bool) -> Self
Enable tracing
Trait Implementations§
Source§impl Clone for DriverConfig
impl Clone for DriverConfig
Source§fn clone(&self) -> DriverConfig
fn clone(&self) -> DriverConfig
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 DriverConfig
impl Debug for DriverConfig
Auto Trait Implementations§
impl Freeze for DriverConfig
impl RefUnwindSafe for DriverConfig
impl Send for DriverConfig
impl Sync for DriverConfig
impl Unpin for DriverConfig
impl UnsafeUnpin for DriverConfig
impl UnwindSafe for DriverConfig
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