Struct actix_web::dev::ServiceResponse
source · [−]pub struct ServiceResponse<B = BoxBody> { /* private fields */ }
Expand description
A service level response wrapper.
Implementations
Create service response from the error
Create service response instance
Create service response for error
Create service response
Returns reference to original request.
Returns reference to response.
Returns mutable reference to response.
Returns response status code.
Returns mutable response’s headers.
Destructures ServiceResponse
into request and response components.
pub fn map_body<F, B2>(self, f: F) -> ServiceResponse<B2> where
F: FnOnce(&mut ResponseHead, B) -> B2,
pub fn map_body<F, B2>(self, f: F) -> ServiceResponse<B2> where
F: FnOnce(&mut ResponseHead, B) -> B2,
Map the current body type to another using a closure. Returns a new response.
Closure receives the response head and the current body type.
Trait Implementations
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl<B = BoxBody> !RefUnwindSafe for ServiceResponse<B>
impl<B = BoxBody> !Send for ServiceResponse<B>
impl<B = BoxBody> !Sync for ServiceResponse<B>
impl<B> Unpin for ServiceResponse<B> where
B: Unpin,
impl<B = BoxBody> !UnwindSafe for ServiceResponse<B>
Blanket Implementations
Mutably borrows from an owned value. 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