pub struct BrowserConfig {Show 16 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>,
pub whitelist_patterns: Option<Vec<String>>,
/* 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.
whitelist_patterns: Option<Vec<String>>Whitelist patterns to allow through the network.
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§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)