Struct webpage::WebpageOptions
source · #[non_exhaustive]pub struct WebpageOptions {
pub allow_insecure: bool,
pub follow_location: bool,
pub max_redirections: u32,
pub timeout: Duration,
pub useragent: String,
pub headers: Vec<String>,
}
Expand description
Configuration options for fetching a webpage
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.allow_insecure: bool
Allow fetching over invalid and/or self signed HTTPS connections [false]
follow_location: bool
Follow HTTP redirects [true]
max_redirections: u32
Max number of redirects to follow [5]
timeout: Duration
Timeout for the HTTP request [10 secs]
useragent: String
User agent string used for the request [webpage-rs - https://crates.io/crates/webpage]
headers: Vec<String>
Custom HTTP headers to send with the request
Trait Implementations§
source§impl Debug for WebpageOptions
impl Debug for WebpageOptions
Auto Trait Implementations§
impl RefUnwindSafe for WebpageOptions
impl Send for WebpageOptions
impl Sync for WebpageOptions
impl Unpin for WebpageOptions
impl UnwindSafe for WebpageOptions
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