Trait actix_web::Responder [] [src]

pub trait Responder {
    type Item: Into<Reply>;
    type Error: Into<Error>;
    fn respond_to(self, req: HttpRequest) -> Result<Self::Item, Self::Error>;
}

Trait implemented by types that generate responses for clients.

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

Associated Types

The associated item which can be returned.

The associated error which can be returned.

Required Methods

Convert itself to Reply or Error.

Implementations on Foreign Types

impl<T: Responder, E: Into<Error>> Responder for Result<T, E>
[src]

[src]

impl<I, E> Responder for Box<Future<Item = I, Error = E>> where
    I: Responder + 'static,
    E: Into<Error> + 'static, 
[src]

[src]

impl Responder for &'static str
[src]

impl Responder for &'static [u8]
[src]

impl Responder for String
[src]

impl<'a> Responder for &'a String
[src]

impl Responder for Bytes
[src]

impl Responder for BytesMut
[src]

Implementors