pub struct Response { /* private fields */ }Implementations§
Source§impl Response
impl Response
Sourcepub fn into_parts(self) -> (Parts, HttpBody<BufferBody>)
pub fn into_parts(self) -> (Parts, HttpBody<BufferBody>)
Consumes the response and returns a tuple containing the component parts of the response and the response body.
Sourcepub fn map<F>(self, map: F) -> Self
pub fn map<F>(self, map: F) -> Self
Consumes the response returning a new response with body mapped to the
return type of the provided closure map.
pub fn body(&self) -> &HttpBody<BufferBody>
pub fn body_mut(&mut self) -> &mut HttpBody<BufferBody>
Returns a reference to the response cookies.
Returns a mutable reference to the response cookies.
pub fn headers(&self) -> &HeaderMap
pub fn headers_mut(&mut self) -> &mut HeaderMap
pub fn status(&self) -> StatusCode
pub fn status_mut(&mut self) -> &mut StatusCode
pub fn version(&self) -> Version
Source§impl Response
impl Response
pub fn new(body: HttpBody<BufferBody>) -> Self
pub fn build() -> ResponseBuilder
pub fn from_parts(parts: Parts, body: HttpBody<BufferBody>) -> Self
Sourcepub fn bad_request() -> Result<Self, Error>
pub fn bad_request() -> Result<Self, Error>
Sourcepub fn payment_required() -> Result<Self, Error>
pub fn payment_required() -> Result<Self, Error>
Sourcepub fn method_not_allowed() -> Result<Self, Error>
pub fn method_not_allowed() -> Result<Self, Error>
Sourcepub fn not_acceptable() -> Result<Self, Error>
pub fn not_acceptable() -> Result<Self, Error>
Sourcepub fn proxy_authentication_required() -> Result<Self, Error>
pub fn proxy_authentication_required() -> Result<Self, Error>
Sourcepub fn request_timeout() -> Result<Self, Error>
pub fn request_timeout() -> Result<Self, Error>
Sourcepub fn length_required() -> Result<Self, Error>
pub fn length_required() -> Result<Self, Error>
Sourcepub fn precondition_failed() -> Result<Self, Error>
pub fn precondition_failed() -> Result<Self, Error>
Sourcepub fn payload_too_large() -> Result<Self, Error>
pub fn payload_too_large() -> Result<Self, Error>
Sourcepub fn uri_too_long() -> Result<Self, Error>
pub fn uri_too_long() -> Result<Self, Error>
Sourcepub fn unsupported_media_type() -> Result<Self, Error>
pub fn unsupported_media_type() -> Result<Self, Error>
Sourcepub fn range_not_satisfiable() -> Result<Self, Error>
pub fn range_not_satisfiable() -> Result<Self, Error>
Sourcepub fn expectation_failed() -> Result<Self, Error>
pub fn expectation_failed() -> Result<Self, Error>
Sourcepub fn im_a_teapot() -> Result<Self, Error>
pub fn im_a_teapot() -> Result<Self, Error>
Sourcepub fn misdirected_request() -> Result<Self, Error>
pub fn misdirected_request() -> Result<Self, Error>
Sourcepub fn unprocessable_entity() -> Result<Self, Error>
pub fn unprocessable_entity() -> Result<Self, Error>
Sourcepub fn failed_dependency() -> Result<Self, Error>
pub fn failed_dependency() -> Result<Self, Error>
Sourcepub fn upgrade_required() -> Result<Self, Error>
pub fn upgrade_required() -> Result<Self, Error>
Sourcepub fn precondition_required() -> Result<Self, Error>
pub fn precondition_required() -> Result<Self, Error>
Sourcepub fn too_many_requests() -> Result<Self, Error>
pub fn too_many_requests() -> Result<Self, Error>
Sourcepub fn request_header_fields_too_large() -> Result<Self, Error>
pub fn request_header_fields_too_large() -> Result<Self, Error>
Sourcepub fn internal_server_error() -> Result<Self, Error>
pub fn internal_server_error() -> Result<Self, Error>
Sourcepub fn not_implemented() -> Result<Self, Error>
pub fn not_implemented() -> Result<Self, Error>
Sourcepub fn bad_gateway() -> Result<Self, Error>
pub fn bad_gateway() -> Result<Self, Error>
Sourcepub fn gateway_timeout() -> Result<Self, Error>
pub fn gateway_timeout() -> Result<Self, Error>
Sourcepub fn http_version_not_supported() -> Result<Self, Error>
pub fn http_version_not_supported() -> Result<Self, Error>
Sourcepub fn variant_also_negotiates() -> Result<Self, Error>
pub fn variant_also_negotiates() -> Result<Self, Error>
Sourcepub fn insufficient_storage() -> Result<Self, Error>
pub fn insufficient_storage() -> Result<Self, Error>
Sourcepub fn loop_detected() -> Result<Self, Error>
pub fn loop_detected() -> Result<Self, Error>
Sourcepub fn not_extended() -> Result<Self, Error>
pub fn not_extended() -> Result<Self, Error>
Trait Implementations§
Source§impl IntoResponse for Response
impl IntoResponse for Response
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