#[non_exhaustive]pub struct RouteFetchOptions {
pub url: Option<String>,
pub method: Option<String>,
pub headers: Option<Headers>,
pub post_data: Option<String>,
pub post_data_bytes: Option<Vec<u8>>,
pub timeout: Option<u64>,
pub max_redirects: Option<u32>,
}Expand description
Options for Route::fetch (optional overrides applied on top of the
intercepted request).
Mirrors https://playwright.dev/docs/api/class-route#route-fetch.
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.url: Option<String>§method: Option<String>§headers: Option<Headers>§post_data: Option<String>§post_data_bytes: Option<Vec<u8>>§timeout: Option<u64>Request timeout, in milliseconds. None uses the client default.
max_redirects: Option<u32>Maximum number of redirects to follow. None uses the client default.
Implementations§
Source§impl RouteFetchOptions
impl RouteFetchOptions
pub fn new() -> Self
pub fn url(self, v: impl Into<String>) -> Self
pub fn method(self, v: impl Into<String>) -> Self
pub fn headers(self, v: Headers) -> Self
pub fn post_data(self, v: impl Into<String>) -> Self
pub fn post_data_bytes(self, v: Vec<u8>) -> Self
pub fn timeout(self, v: u64) -> Self
pub fn max_redirects(self, v: u32) -> Self
Trait Implementations§
Source§impl Clone for RouteFetchOptions
impl Clone for RouteFetchOptions
Source§fn clone(&self) -> RouteFetchOptions
fn clone(&self) -> RouteFetchOptions
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 RouteFetchOptions
impl Debug for RouteFetchOptions
Source§impl Default for RouteFetchOptions
impl Default for RouteFetchOptions
Source§fn default() -> RouteFetchOptions
fn default() -> RouteFetchOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RouteFetchOptions
impl RefUnwindSafe for RouteFetchOptions
impl Send for RouteFetchOptions
impl Sync for RouteFetchOptions
impl Unpin for RouteFetchOptions
impl UnsafeUnpin for RouteFetchOptions
impl UnwindSafe for RouteFetchOptions
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