pub struct FulfillRequestBuilder { /* private fields */ }Expand description
Builder for FulfillRequest.
Implementations§
Source§impl FulfillRequestBuilder
impl FulfillRequestBuilder
Sourcepub fn request_id<VALUE: Into<RequestId>>(&mut self, value: VALUE) -> &mut Self
pub fn request_id<VALUE: Into<RequestId>>(&mut self, value: VALUE) -> &mut Self
An id the client received in requestPaused event.
Sourcepub fn response_code<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
pub fn response_code<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
An HTTP response code.
Sourcepub fn response_headers<VALUE: Into<Vec<HeaderEntry>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn response_headers<VALUE: Into<Vec<HeaderEntry>>>( &mut self, value: VALUE, ) -> &mut Self
Response headers.
Sourcepub fn binary_response_headers<VALUE: Into<Vec<u8>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn binary_response_headers<VALUE: Into<Vec<u8>>>( &mut self, value: VALUE, ) -> &mut Self
Alternative way of specifying response headers as a \0-separated series of name: value pairs. Prefer the above method unless you need to represent some non-UTF8 values that can’t be transmitted over the protocol as text.
Sourcepub fn body<VALUE: Into<Vec<u8>>>(&mut self, value: VALUE) -> &mut Self
pub fn body<VALUE: Into<Vec<u8>>>(&mut self, value: VALUE) -> &mut Self
A response body. If absent, original response body will be used if the request is intercepted at the response stage and empty body will be used if the request is intercepted at the request stage.
Sourcepub fn response_phrase<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn response_phrase<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
A textual representation of responseCode. If absent, a standard phrase matching responseCode is used.
Sourcepub fn build(&self) -> Result<FulfillRequest, FulfillRequestBuilderError>
pub fn build(&self) -> Result<FulfillRequest, FulfillRequestBuilderError>
Trait Implementations§
Source§impl Clone for FulfillRequestBuilder
impl Clone for FulfillRequestBuilder
Source§fn clone(&self) -> FulfillRequestBuilder
fn clone(&self) -> FulfillRequestBuilder
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 moreAuto Trait Implementations§
impl Freeze for FulfillRequestBuilder
impl RefUnwindSafe for FulfillRequestBuilder
impl Send for FulfillRequestBuilder
impl Sync for FulfillRequestBuilder
impl Unpin for FulfillRequestBuilder
impl UnsafeUnpin for FulfillRequestBuilder
impl UnwindSafe for FulfillRequestBuilder
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