pub struct Response {
pub url: Url,
pub status: StatusCode,
pub headers: HeaderMap,
pub body: Bytes,
pub request_url: Url,
pub meta: DashMap<Cow<'static, str>, Value>,
pub cached: bool,
}Expand description
Represents an HTTP response received from a server.
Fields§
§url: UrlThe final URL of the response after any redirects.
status: StatusCodeThe HTTP status code of the response.
headers: HeaderMapThe headers of the response.
body: BytesThe body of the response.
request_url: UrlThe original URL of the request that led to this response.
meta: DashMap<Cow<'static, str>, Value>Metadata associated with the response, carried over from the request.
cached: boolIndicates if the response was served from a cache.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Response
impl !RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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