pub struct BrowserConfigBuilder { /* private fields */ }
Implementations§
Source§impl BrowserConfigBuilder
impl BrowserConfigBuilder
pub fn window_size(self, width: u32, height: u32) -> Self
pub fn no_sandbox(self) -> Self
pub fn with_head(self) -> Self
pub fn new_headless_mode(self) -> Self
pub fn headless_mode(self, mode: HeadlessMode) -> Self
pub fn incognito(self) -> Self
pub fn respect_https_errors(self) -> Self
pub fn port(self, port: u16) -> Self
pub fn launch_timeout(self, timeout: Duration) -> Self
pub fn request_timeout(self, timeout: Duration) -> Self
Sourcepub fn viewport(self, viewport: impl Into<Option<Viewport>>) -> Self
pub fn viewport(self, viewport: impl Into<Option<Viewport>>) -> Self
Configures the viewport of the browser, which defaults to 800x600
.
None
disables viewport emulation (i.e., it uses the browsers default
configuration, which fills the available space. This is similar to what
Playwright does when you provide null
as the value of its viewport
option).
pub fn user_data_dir(self, data_dir: impl AsRef<Path>) -> Self
pub fn chrome_executable(self, path: impl AsRef<Path>) -> Self
pub fn chrome_detection(self, options: DetectionOptions) -> Self
pub fn extension(self, extension: impl Into<String>) -> Self
pub fn extensions<I, S>(self, extensions: I) -> Self
pub fn env(self, key: impl Into<String>, val: impl Into<String>) -> Self
pub fn envs<I, K, V>(self, envs: I) -> Self
pub fn arg(self, arg: impl Into<String>) -> Self
pub fn args<I, S>(self, args: I) -> Self
pub fn disable_default_args(self) -> Self
pub fn enable_request_intercept(self) -> Self
pub fn disable_request_intercept(self) -> Self
pub fn enable_cache(self) -> Self
pub fn disable_cache(self) -> Self
pub fn set_extra_headers(self, headers: Option<HashMap<String, String>>) -> Self
pub fn build(self) -> Result<BrowserConfig, String>
Trait Implementations§
Source§impl Clone for BrowserConfigBuilder
impl Clone for BrowserConfigBuilder
Source§fn clone(&self) -> BrowserConfigBuilder
fn clone(&self) -> BrowserConfigBuilder
Returns a copy 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 BrowserConfigBuilder
impl Debug for BrowserConfigBuilder
Auto Trait Implementations§
impl Freeze for BrowserConfigBuilder
impl RefUnwindSafe for BrowserConfigBuilder
impl Send for BrowserConfigBuilder
impl Sync for BrowserConfigBuilder
impl Unpin for BrowserConfigBuilder
impl UnwindSafe for BrowserConfigBuilder
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more