Struct actix_web::dev::ServiceResponse [−][src]
pub struct ServiceResponse<B = AnyBody> { /* fields omitted */ }
Implementations
Create service response from the error
Create service response instance
Create service response for error
Create service response
Get reference to original request
pub fn response(&self) -> &HttpResponse<B>ⓘNotable traits for HttpResponse<Body>
impl Future for HttpResponse<Body> type Output = Result<Response<Body>, Error>;
pub fn response(&self) -> &HttpResponse<B>ⓘNotable traits for HttpResponse<Body>
impl Future for HttpResponse<Body> type Output = Result<Response<Body>, Error>;Get reference to response
pub fn response_mut(&mut self) -> &mut HttpResponse<B>ⓘNotable traits for HttpResponse<Body>
impl Future for HttpResponse<Body> type Output = Result<Response<Body>, Error>;
pub fn response_mut(&mut self) -> &mut HttpResponse<B>ⓘNotable traits for HttpResponse<Body>
impl Future for HttpResponse<Body> type Output = Result<Response<Body>, Error>;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.
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, Set a new body
Trait Implementations
fn from(res: ServiceResponse<B>) -> HttpResponse<B>ⓘNotable traits for HttpResponse<Body>
impl Future for HttpResponse<Body> type Output = Result<Response<Body>, Error>;
fn from(res: ServiceResponse<B>) -> HttpResponse<B>ⓘNotable traits for HttpResponse<Body>
impl Future for HttpResponse<Body> type Output = Result<Response<Body>, Error>;Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl<B = AnyBody> !RefUnwindSafe for ServiceResponse<B>impl<B = AnyBody> !Send for ServiceResponse<B>impl<B = AnyBody> !Sync for ServiceResponse<B>impl<B> Unpin for ServiceResponse<B> where
B: Unpin, impl<B = AnyBody> !UnwindSafe for ServiceResponse<B>