pub struct BrowserOptions {
pub timeout: Duration,
pub user_agent: String,
pub enable_javascript: bool,
pub cookies: Vec<String>,
pub headers: Vec<String>,
pub request_delay: Duration,
pub cache_ttl: Duration,
pub filter_blacklisted_urls: bool,
pub respect_robots_txt: bool,
pub load_user_blacklist: bool,
pub extra_blacklist_files: Vec<String>,
pub post_load_wait: Duration,
}Expand description
Configuration for the HTTP client
Fields§
§timeout: DurationRequest timeout
user_agent: StringUser-Agent string
enable_javascript: boolExecute inline <script> blocks via the built-in JS interpreter,
capturing document.write output into the page.
Initial cookies to send with every request (format: “name=value”)
headers: Vec<String>Custom HTTP headers to send with every request (format: “Name: Value”)
request_delay: DurationMinimum delay between consecutive requests to the same host
cache_ttl: DurationCache TTL for fetched pages (zero = caching disabled)
filter_blacklisted_urls: boolSkip known non-content URLs (ads, tracking pixels) on secondary fetches
respect_robots_txt: boolFetch and honor robots.txt disallow rules and crawl-delay
load_user_blacklist: boolLoad ~/.web2md/blacklist.txt when present
extra_blacklist_files: Vec<String>Additional blacklist pattern files (one pattern per line)
post_load_wait: DurationPost-load wait after fetch (milliseconds) for JS-heavy pages; also caps setTimeout flush
Trait Implementations§
Source§impl Clone for BrowserOptions
impl Clone for BrowserOptions
Source§fn clone(&self) -> BrowserOptions
fn clone(&self) -> BrowserOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BrowserOptions
impl Debug for BrowserOptions
Auto Trait Implementations§
impl Freeze for BrowserOptions
impl RefUnwindSafe for BrowserOptions
impl Send for BrowserOptions
impl Sync for BrowserOptions
impl Unpin for BrowserOptions
impl UnsafeUnpin for BrowserOptions
impl UnwindSafe for BrowserOptions
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