Skip to main content

ResponseBuilder

Struct ResponseBuilder 

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

Implementations§

Source§

impl<'a> ResponseBuilder<'a>

Source

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

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

Source

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

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

Source

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

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

Source

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

Remote IP address.

Source

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

Remote port.

Source

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

Specifies that the request was served from the disk cache.

Source

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

Specifies that the request was served from the ServiceWorker.

Source

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

Specifies that the request was served from the prefetch cache.

Source

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

Specifies that the request was served from the prefetch cache.

Source

pub fn serviceWorkerRouterInfo( self, serviceWorkerRouterInfo: 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 serviceWorkerResponseSource( self, serviceWorkerResponseSource: ServiceWorkerResponseSource, ) -> Self

Response source of response from ServiceWorker.

Source

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

The time at which the returned response was generated.

Source

pub fn cacheStorageCacheName( self, cacheStorageCacheName: 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 alternateProtocolUsage( self, alternateProtocolUsage: AlternateProtocolUsage, ) -> Self

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

Source

pub fn securityDetails(self, securityDetails: 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.