[−][src]Trait actix_web::Responder
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
type Item: Into<AsyncResult<HttpResponse>>
The associated item which can be returned.
type Error: Into<Error>
The associated error which can be returned.
Required Methods
fn respond_to<S: 'static>(
self,
req: &HttpRequest<S>
) -> Result<Self::Item, Self::Error>
self,
req: &HttpRequest<S>
) -> Result<Self::Item, Self::Error>
Convert itself to AsyncResult or Error.
Implementations on Foreign Types
impl<T> Responder for Option<T> where
T: Responder, [src]
impl<T> Responder for Option<T> where
T: Responder, type Item = AsyncResult<HttpResponse>
type Error = Error
fn respond_to<S: 'static>(
self,
req: &HttpRequest<S>
) -> Result<AsyncResult<HttpResponse>, Error>[src]
fn respond_to<S: 'static>(
self,
req: &HttpRequest<S>
) -> Result<AsyncResult<HttpResponse>, Error>impl<T: Responder, E: Into<Error>> Responder for Result<T, E>[src]
impl<T: Responder, E: Into<Error>> Responder for Result<T, E>type Item = <T as Responder>::Item
type Error = Error
fn respond_to<S: 'static>(
self,
req: &HttpRequest<S>
) -> Result<Self::Item, Error>[src]
fn respond_to<S: 'static>(
self,
req: &HttpRequest<S>
) -> Result<Self::Item, Error>impl<I, E> Responder for Box<Future<Item = I, Error = E>> where
I: Responder + 'static,
E: Into<Error> + 'static, [src]
impl<I, E> Responder for Box<Future<Item = I, Error = E>> where
I: Responder + 'static,
E: Into<Error> + 'static, type Item = AsyncResult<HttpResponse>
type Error = Error
fn respond_to<S: 'static>(
self,
req: &HttpRequest<S>
) -> Result<AsyncResult<HttpResponse>, Error>[src]
fn respond_to<S: 'static>(
self,
req: &HttpRequest<S>
) -> Result<AsyncResult<HttpResponse>, Error>impl Responder for &'static str[src]
impl Responder for &'static strtype Item = HttpResponse
type Error = Error
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>[src]
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>impl Responder for &'static [u8][src]
impl Responder for &'static [u8]type Item = HttpResponse
type Error = Error
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>[src]
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>impl Responder for String[src]
impl Responder for Stringtype Item = HttpResponse
type Error = Error
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>[src]
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>impl<'a> Responder for &'a String[src]
impl<'a> Responder for &'a Stringtype Item = HttpResponse
type Error = Error
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>[src]
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>impl Responder for Bytes[src]
impl Responder for Bytestype Item = HttpResponse
type Error = Error
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>[src]
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>impl Responder for BytesMut[src]
impl Responder for BytesMuttype Item = HttpResponse
type Error = Error
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>[src]
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>Implementors
impl Responder for Binary[src]
impl Responder for Binarytype Item = HttpResponse
type Error = Error
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>[src]
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>impl Responder for AsyncResult<HttpResponse>[src]
impl Responder for AsyncResult<HttpResponse>type Item = AsyncResult<HttpResponse>
type Error = Error
fn respond_to<S>(
self,
_: &HttpRequest<S>
) -> Result<AsyncResult<HttpResponse>, Error>[src]
fn respond_to<S>(
self,
_: &HttpRequest<S>
) -> Result<AsyncResult<HttpResponse>, Error>impl Responder for HttpResponseBuilder[src]
impl Responder for HttpResponseBuildertype Item = HttpResponse
type Error = Error
fn respond_to<S>(self, _: &HttpRequest<S>) -> Result<HttpResponse, Error>[src]
fn respond_to<S>(self, _: &HttpRequest<S>) -> Result<HttpResponse, Error>impl Responder for HttpResponse[src]
impl Responder for HttpResponsetype Item = AsyncResult<HttpResponse>
type Error = Error
fn respond_to<S>(
self,
_: &HttpRequest<S>
) -> Result<AsyncResult<HttpResponse>, Error>[src]
fn respond_to<S>(
self,
_: &HttpRequest<S>
) -> Result<AsyncResult<HttpResponse>, Error>impl<A, B> Responder for Either<A, B> where
A: Responder,
B: Responder, [src]
impl<A, B> Responder for Either<A, B> where
A: Responder,
B: Responder, type Item = AsyncResult<HttpResponse>
type Error = Error
fn respond_to<S: 'static>(
self,
req: &HttpRequest<S>
) -> Result<AsyncResult<HttpResponse>, Error>[src]
fn respond_to<S: 'static>(
self,
req: &HttpRequest<S>
) -> Result<AsyncResult<HttpResponse>, Error>impl<C: StaticFileConfig> Responder for NamedFile<C>[src]
impl<C: StaticFileConfig> Responder for NamedFile<C>type Item = HttpResponse
type Error = Error
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>[src]
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>impl<T> Responder for InternalError<T> where
T: Send + Sync + Debug + Display + 'static, [src]
impl<T> Responder for InternalError<T> where
T: Send + Sync + Debug + Display + 'static, type Item = HttpResponse
type Error = Error
fn respond_to<S>(self, _: &HttpRequest<S>) -> Result<HttpResponse, Error>[src]
fn respond_to<S>(self, _: &HttpRequest<S>) -> Result<HttpResponse, Error>impl<T: Serialize> Responder for Json<T>[src]
impl<T: Serialize> Responder for Json<T>type Item = HttpResponse
type Error = Error
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>[src]
fn respond_to<S>(self, req: &HttpRequest<S>) -> Result<HttpResponse, Error>