pub struct BrowserConfig {Show 15 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,
pub max_bytes_allowed: Option<u64>,
/* 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: boolWhether to enable request interception.
cache_enabled: boolWhether to enable cache.
service_worker_enabled: boolWhether to enable or disable Service Workers. Disabling may reduce background network activity and caching effects.
ignore_visuals: boolWhether to ignore image/visual requests during interception. Can reduce bandwidth and speed up crawling when visuals are unnecessary.
ignore_stylesheets: boolWhether to ignore stylesheet (CSS) requests during interception. Useful for content-only crawls.
ignore_javascript: boolWhether to ignore JavaScript requests during interception. This still allows critical framework bundles to pass when applicable.
ignore_analytics: boolWhether to ignore analytics/telemetry requests during interception.
ignore_ads: boolWhether to ignore ad network requests during interception.
extra_headers: Option<HashMap<String, String>>Extra headers.
only_html: boolOnly html
intercept_manager: NetworkInterceptManagerThe interception intercept manager.
max_bytes_allowed: Option<u64>The max bytes to receive.
Implementations§
Source§impl BrowserConfig
impl BrowserConfig
Sourcepub fn builder() -> BrowserConfigBuilder
pub fn builder() -> BrowserConfigBuilder
Browser builder default config.
Sourcepub fn with_executable(path: impl AsRef<Path>) -> Self
pub fn with_executable(path: impl AsRef<Path>) -> Self
Launch with the executable path.
Trait Implementations§
Source§impl Clone for BrowserConfig
impl Clone for BrowserConfig
Source§fn clone(&self) -> BrowserConfig
fn clone(&self) -> BrowserConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more