pub struct BrowserConfig {Show 14 fields
pub process_envs: Option<HashMap<String, String>>,
pub user_data_dir: Option<PathBuf>,
pub viewport: Option<Viewport>,
pub request_intercept: bool,
pub cache_enabled: bool,
pub service_worker_enabled: bool,
pub ignore_visuals: bool,
pub ignore_stylesheets: bool,
pub ignore_javascript: bool,
pub ignore_analytics: bool,
pub ignore_ads: bool,
pub extra_headers: Option<HashMap<String, String>>,
pub only_html: bool,
pub intercept_manager: NetworkInterceptManager,
/* private fields */
}
Fields§
§process_envs: Option<HashMap<String, String>>
Environment variables to set for the Chromium process. Passes value through to std::process::Command::envs.
user_data_dir: Option<PathBuf>
Data dir for user data
viewport: Option<Viewport>
§request_intercept: bool
Whether to enable request interception
cache_enabled: bool
Whether to enable cache.
service_worker_enabled: bool
Whether to enable/disable service workers.
ignore_visuals: bool
Whether to ignore visuals when request interception is enabled.
ignore_stylesheets: bool
Whether to ignore stylesheets when request interception is enabled.
ignore_javascript: bool
Whether to ignore javascript when request interception is enabled. This will allow framework JS like react to go through.
ignore_analytics: bool
Whether to ignore analytics when request interception is enabled.
ignore_ads: bool
Whether to ignore ads when request interception is enabled.
extra_headers: Option<HashMap<String, String>>
Extra headers.
only_html: bool
Only html
intercept_manager: NetworkInterceptManager
The interception intercept manager.
Implementations§
Source§impl BrowserConfig
impl BrowserConfig
pub fn builder() -> BrowserConfigBuilder
pub fn with_executable(path: impl AsRef<Path>) -> Self
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§fn default() -> BrowserConfig
fn default() -> BrowserConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BrowserConfig
impl RefUnwindSafe for BrowserConfig
impl Send for BrowserConfig
impl Sync for BrowserConfig
impl Unpin 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