pub struct Response<'a> { /* private fields */ }Expand description
HTTP response data.
Implementations§
Source§impl<'a> Response<'a>
impl<'a> Response<'a>
pub fn builder( url: impl Into<Cow<'a, str>>, status: i64, statusText: impl Into<Cow<'a, str>>, headers: Headers, mimeType: impl Into<Cow<'a, str>>, charset: impl Into<Cow<'a, str>>, connectionReused: bool, connectionId: f64, encodedDataLength: f64, securityState: SecurityState, ) -> ResponseBuilder<'a>
pub fn url(&self) -> &str
pub fn status(&self) -> i64
pub fn statusText(&self) -> &str
pub fn headers(&self) -> &Headers
pub fn headersText(&self) -> Option<&str>
pub fn mimeType(&self) -> &str
pub fn charset(&self) -> &str
pub fn requestHeaders(&self) -> Option<&Headers>
pub fn requestHeadersText(&self) -> Option<&str>
pub fn connectionReused(&self) -> bool
pub fn connectionId(&self) -> f64
pub fn remoteIPAddress(&self) -> Option<&str>
pub fn remotePort(&self) -> Option<i64>
pub fn fromDiskCache(&self) -> Option<bool>
pub fn fromServiceWorker(&self) -> Option<bool>
pub fn fromPrefetchCache(&self) -> Option<bool>
pub fn fromEarlyHints(&self) -> Option<bool>
pub fn serviceWorkerRouterInfo(&self) -> Option<&ServiceWorkerRouterInfo>
pub fn encodedDataLength(&self) -> f64
pub fn timing(&self) -> Option<&ResourceTiming>
pub fn serviceWorkerResponseSource( &self, ) -> Option<&ServiceWorkerResponseSource>
pub fn responseTime(&self) -> Option<&TimeSinceEpoch>
pub fn cacheStorageCacheName(&self) -> Option<&str>
pub fn protocol(&self) -> Option<&str>
pub fn alternateProtocolUsage(&self) -> Option<&AlternateProtocolUsage>
pub fn securityState(&self) -> &SecurityState
pub fn securityDetails(&self) -> Option<&SecurityDetails<'a>>
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for Response<'a>
impl<'de, 'a> Deserialize<'de> for Response<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for Response<'a>
impl<'a> RefUnwindSafe for Response<'a>
impl<'a> Send for Response<'a>
impl<'a> Sync for Response<'a>
impl<'a> Unpin for Response<'a>
impl<'a> UnsafeUnpin for Response<'a>
impl<'a> UnwindSafe for Response<'a>
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