pub struct HttpResponse {
pub status: u16,
pub headers: Vec<(String, String)>,
pub body: Bytes,
pub not_modified: bool,
}Expand description
A captured HTTP response.
Fields§
§status: u16HTTP status code (e.g. 200, 304).
headers: Vec<(String, String)>Response headers as (name, value) pairs (lower-cased names).
body: BytesResponse body bytes (empty for 304 Not Modified).
not_modified: booltrue when the server answered 304 Not Modified to a conditional
GET — the body is empty and the previously fetched representation is
still current.
Trait Implementations§
Source§impl Clone for HttpResponse
impl Clone for HttpResponse
Source§fn clone(&self) -> HttpResponse
fn clone(&self) -> HttpResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HttpResponse
impl RefUnwindSafe for HttpResponse
impl Send for HttpResponse
impl Sync for HttpResponse
impl Unpin for HttpResponse
impl UnsafeUnpin for HttpResponse
impl UnwindSafe for HttpResponse
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