Struct actix_web::dev::ServiceResponse [−][src]
pub struct ServiceResponse<B = Body> { /* fields omitted */ }
Implementations
Create service response instance
Create service response from the error
Create service response for error
Create service response
Get reference to original request
Get reference to response
Get mutable reference to response
Get the response status code
Returns mutable response’s headers.
Execute closure and in case of error convert it to response.
Extract response body
pub fn map_body<F, B2>(self, f: F) -> ServiceResponse<B2> where
F: FnOnce(&mut ResponseHead, ResponseBody<B>) -> ResponseBody<B2>,
pub fn map_body<F, B2>(self, f: F) -> ServiceResponse<B2> where
F: FnOnce(&mut ResponseHead, ResponseBody<B>) -> ResponseBody<B2>,
Set a new body
Trait Implementations
Auto Trait Implementations
impl<B = Body> !RefUnwindSafe for ServiceResponse<B>
impl<B = Body> !Send for ServiceResponse<B>
impl<B = Body> !Sync for ServiceResponse<B>
impl<B> Unpin for ServiceResponse<B> where
B: Unpin,
impl<B = Body> !UnwindSafe for ServiceResponse<B>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more