pub struct Response { /* private fields */ }Expand description
HTTP Response An HTTP Response is formed by:
- Status code
- (optional) Response headers
- (optional) Server’s cookies (header
Set-Cookie) - (optional) Response body
For mor information see HTTP Response
Implementations§
Source§impl Response
impl Response
Sourcepub fn new(status: HttpStatusCode) -> Response
pub fn new(status: HttpStatusCode) -> Response
Response default constructor, only sets the status code. After constructing the value, as struct members are public, they can be accessed directly
Sourcepub fn status_code(&self) -> HttpStatusCode
pub fn status_code(&self) -> HttpStatusCode
Get the Response status code
Get Request Cookies.
Sourcepub fn proxy_auth(&self) -> Vec<&str>
pub fn proxy_auth(&self) -> Vec<&str>
Get Request Proxy Authorization headers
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