pub struct ChaserConfig {
pub context_limit: usize,
pub timeout_ms: u64,
pub profile: Profile,
pub lazy_init: bool,
pub chrome_path: Option<PathBuf>,
pub headless: bool,
pub viewport_width: u32,
pub viewport_height: u32,
}Expand description
Configuration for ChaserCF
Fields§
§context_limit: usizeMaximum concurrent browser contexts (default: 20)
timeout_ms: u64Request timeout in milliseconds (default: 60000)
profile: ProfileStealth profile to use (default: Windows)
lazy_init: boolWhether to defer browser initialization until first use (default: false)
chrome_path: Option<PathBuf>Path to Chrome/Chromium binary (default: auto-detect)
headless: boolWhether to run in headless mode (default: false for stealth)
viewport_width: u32Browser viewport width (default: 1920)
viewport_height: u32Browser viewport height (default: 1080)
Implementations§
Source§impl ChaserConfig
impl ChaserConfig
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Create configuration from environment variables
Environment variables:
CHASER_CONTEXT_LIMIT: Max concurrent contexts (default: 20)CHASER_TIMEOUT: Timeout in ms (default: 60000)CHASER_PROFILE: Profile name (windows/linux/macos)CHASER_LAZY_INIT: Enable lazy init (true/false)CHROME_BIN: Path to Chrome binaryCHASER_HEADLESS: Run headless (true/false)
Sourcepub fn with_context_limit(self, limit: usize) -> Self
pub fn with_context_limit(self, limit: usize) -> Self
Builder method: set context limit
Sourcepub fn with_timeout_ms(self, timeout: u64) -> Self
pub fn with_timeout_ms(self, timeout: u64) -> Self
Builder method: set timeout
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Builder method: set timeout from Duration
Sourcepub fn with_profile(self, profile: Profile) -> Self
pub fn with_profile(self, profile: Profile) -> Self
Builder method: set profile
Sourcepub fn with_lazy_init(self, lazy: bool) -> Self
pub fn with_lazy_init(self, lazy: bool) -> Self
Builder method: enable lazy initialization
Sourcepub fn with_chrome_path(self, path: impl Into<PathBuf>) -> Self
pub fn with_chrome_path(self, path: impl Into<PathBuf>) -> Self
Builder method: set Chrome path
Sourcepub fn with_headless(self, headless: bool) -> Self
pub fn with_headless(self, headless: bool) -> Self
Builder method: set headless mode
Sourcepub fn with_viewport(self, width: u32, height: u32) -> Self
pub fn with_viewport(self, width: u32, height: u32) -> Self
Builder method: set viewport size
Trait Implementations§
Source§impl Clone for ChaserConfig
impl Clone for ChaserConfig
Source§fn clone(&self) -> ChaserConfig
fn clone(&self) -> ChaserConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more