pub struct FulfillOptions {
pub status: Option<u16>,
pub headers: Option<HashMap<String, String>>,
pub body: Option<Vec<u8>>,
pub content_type: Option<String>,
}Expand description
Options for fulfilling a route with a custom response.
See: https://playwright.dev/docs/api/class-route#route-fulfill
Fields§
§status: Option<u16>HTTP status code (default: 200)
headers: Option<HashMap<String, String>>Response headers
body: Option<Vec<u8>>Response body as bytes
content_type: Option<String>Content-Type header value
Implementations§
Source§impl FulfillOptions
impl FulfillOptions
Sourcepub fn builder() -> FulfillOptionsBuilder
pub fn builder() -> FulfillOptionsBuilder
Creates a new FulfillOptions builder
Trait Implementations§
Source§impl Clone for FulfillOptions
impl Clone for FulfillOptions
Source§fn clone(&self) -> FulfillOptions
fn clone(&self) -> FulfillOptions
Returns a duplicate of the value. Read more
1.0.0 · 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 FulfillOptions
impl Debug for FulfillOptions
Source§impl Default for FulfillOptions
impl Default for FulfillOptions
Source§fn default() -> FulfillOptions
fn default() -> FulfillOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FulfillOptions
impl RefUnwindSafe for FulfillOptions
impl Send for FulfillOptions
impl Sync for FulfillOptions
impl Unpin for FulfillOptions
impl UnsafeUnpin for FulfillOptions
impl UnwindSafe for FulfillOptions
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