Skip to main content

ResponseBuilder

Struct ResponseBuilder 

Source
pub struct ResponseBuilder<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> ResponseBuilder<'a>

Source

pub fn headers_text(self, headers_text: impl Into<Cow<'a, str>>) -> Self

HTTP response headers text. This has been replaced by the headers in Network.responseReceivedExtraInfo.

Source

pub fn request_headers(self, request_headers: Headers) -> Self

Refined HTTP request headers that were actually transmitted over the network.

Source

pub fn request_headers_text( self, request_headers_text: impl Into<Cow<'a, str>>, ) -> Self

HTTP request headers text. This has been replaced by the headers in Network.requestWillBeSentExtraInfo.

Source

pub fn remote_ip_address( self, remote_ip_address: impl Into<Cow<'a, str>>, ) -> Self

Remote IP address.

Source

pub fn remote_port(self, remote_port: i64) -> Self

Remote port.

Source

pub fn from_disk_cache(self, from_disk_cache: bool) -> Self

Specifies that the request was served from the disk cache.

Source

pub fn from_service_worker(self, from_service_worker: bool) -> Self

Specifies that the request was served from the ServiceWorker.

Source

pub fn from_prefetch_cache(self, from_prefetch_cache: bool) -> Self

Specifies that the request was served from the prefetch cache.

Source

pub fn from_early_hints(self, from_early_hints: bool) -> Self

Specifies that the request was served from the prefetch cache.

Source

pub fn service_worker_router_info( self, service_worker_router_info: ServiceWorkerRouterInfo, ) -> Self

Information about how ServiceWorker Static Router API was used. If this field is set with ‘matchedSourceType’ field, a matching rule is found. If this field is set without ‘matchedSource’, no matching rule is found. Otherwise, the API is not used.

Source

pub fn timing(self, timing: ResourceTiming) -> Self

Timing information for the given request.

Source

pub fn service_worker_response_source( self, service_worker_response_source: impl Into<ServiceWorkerResponseSource>, ) -> Self

Response source of response from ServiceWorker.

Source

pub fn response_time(self, response_time: TimeSinceEpoch) -> Self

The time at which the returned response was generated.

Source

pub fn cache_storage_cache_name( self, cache_storage_cache_name: impl Into<Cow<'a, str>>, ) -> Self

Cache Storage Cache Name.

Source

pub fn protocol(self, protocol: impl Into<Cow<'a, str>>) -> Self

Protocol used to fetch this request.

Source

pub fn alternate_protocol_usage( self, alternate_protocol_usage: impl Into<AlternateProtocolUsage>, ) -> Self

The reason why Chrome uses a specific transport protocol for HTTP semantics.

Source

pub fn security_details(self, security_details: SecurityDetails<'a>) -> Self

Security details for the request.

Source

pub fn build(self) -> Response<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for ResponseBuilder<'a>

§

impl<'a> RefUnwindSafe for ResponseBuilder<'a>

§

impl<'a> Send for ResponseBuilder<'a>

§

impl<'a> Sync for ResponseBuilder<'a>

§

impl<'a> Unpin for ResponseBuilder<'a>

§

impl<'a> UnsafeUnpin for ResponseBuilder<'a>

§

impl<'a> UnwindSafe for ResponseBuilder<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.