Expand description
Contains the data of an http response
Fields
content: Vec<u8>
Implementations
sourceimpl Response
impl Response
sourcepub fn switching_protocols() -> Response
pub fn switching_protocols() -> Response
Creates an Switching Protocols response, with a 101 status code
Creates a Non-Authoritative Information response, with a 203 status code
sourcepub fn no_content() -> Response
pub fn no_content() -> Response
Creates a No Content response, with a 204 status code
sourcepub fn reset_content() -> Response
pub fn reset_content() -> Response
Creates a Reset Content response, with a 205 status code
sourcepub fn partial_content() -> Response
pub fn partial_content() -> Response
Creates a Partial Content response, with a 206 status code
sourcepub fn bad_request() -> Response
pub fn bad_request() -> Response
Creates a Bad Request response, with a 400 status code
Creates an Unauthorized response, with a 401 status code
sourcepub fn payment_required() -> Response
pub fn payment_required() -> Response
Creates a Payment Required response, with a 402 status code
sourcepub fn internal_server_error() -> Response
pub fn internal_server_error() -> Response
Creates an Internal Server Error response, with a 500 status code
sourcepub fn not_implemented() -> Response
pub fn not_implemented() -> Response
Creates a Not Implemented response, with a 501 status code
sourcepub fn bad_gateway() -> Response
pub fn bad_gateway() -> Response
Creates a Bad Gateway response, with a 502 status code
Creates a Service Unavailable response, with a 503 status code
sourcepub fn new() -> Response
pub fn new() -> Response
Creates a new response, with defaut response status 200, and a text/html content type
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more