pub struct Response {
pub header: Header,
pub body: Body,
}Expand description
Handle for accessing and mutating the current HTTP response.
Fields§
§header: HeaderHandle for accessing and mutating response headers.
body: BodyHandle for reading or writing the response body.
Implementations§
Source§impl Response
impl Response
Sourcepub fn set_status(&self, code: i32)
pub fn set_status(&self, code: i32)
Set the response status code.
To call this in handle_response requires feature::BufferResponse.
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin 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