Trait actix_web::Responder

source ·
pub trait Responder {
    type Item: Into<AsyncResult<HttpResponse>>;
    type Error: Into<Error>;

    fn respond_to<S: 'static>(
        self,
        req: &HttpRequest<S>
    ) -> Result<Self::Item, Self::Error>; }
Expand description

Trait implemented by types that generate responses for clients.

Types that implement this trait can be used as the return type of a handler.

Required Associated Types

The associated item which can be returned.

The associated error which can be returned.

Required Methods

Convert itself to AsyncResult or Error.

Implementations on Foreign Types

Implementors