Trait ajars_actix_web::actix_web::dev::Handler [−][src]
pub trait Handler<T, R>: 'static + Clone where
R: Future,
<R as Future>::Output: Responder, { fn call(&self, param: T) -> R; }
Expand description
A request handler is an async function that accepts zero or more parameters that can be
extracted from a request (i.e., impl FromRequest
) and returns a type
that can be converted into an HttpResponse
(that is, it impls the Responder
trait).
If you got the error the trait Handler<_, _, _> is not implemented
, then your function is not
a valid handler. See Request Handlers for more information.
Required methods
Implementors
impl<Func, A, B, C, D, E, F, G, H, I, J, K, L, Res> Handler<(A, B, C, D, E, F, G, H, I, J, K, L), Res> for Func where
Res: Future,
Func: Fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Res + Clone + 'static,
<Res as Future>::Output: Responder,
impl<Func, A, B, C, D, E, F, G, H, I, J, K, Res> Handler<(A, B, C, D, E, F, G, H, I, J, K), Res> for Func where
Res: Future,
Func: Fn(A, B, C, D, E, F, G, H, I, J, K) -> Res + Clone + 'static,
<Res as Future>::Output: Responder,
impl<Func, A, B, C, D, E, F, G, H, I, J, Res> Handler<(A, B, C, D, E, F, G, H, I, J), Res> for Func where
Res: Future,
Func: Fn(A, B, C, D, E, F, G, H, I, J) -> Res + Clone + 'static,
<Res as Future>::Output: Responder,
impl<Func, A, B, C, D, E, F, G, H, I, Res> Handler<(A, B, C, D, E, F, G, H, I), Res> for Func where
Res: Future,
Func: Fn(A, B, C, D, E, F, G, H, I) -> Res + Clone + 'static,
<Res as Future>::Output: Responder,
impl<Func, A, B, C, D, E, F, G, H, Res> Handler<(A, B, C, D, E, F, G, H), Res> for Func where
Res: Future,
Func: Fn(A, B, C, D, E, F, G, H) -> Res + Clone + 'static,
<Res as Future>::Output: Responder,
impl<Func, A, B, C, D, E, F, G, Res> Handler<(A, B, C, D, E, F, G), Res> for Func where
Res: Future,
Func: Fn(A, B, C, D, E, F, G) -> Res + Clone + 'static,
<Res as Future>::Output: Responder,
impl<Func, A, B, C, D, E, F, Res> Handler<(A, B, C, D, E, F), Res> for Func where
Res: Future,
Func: Fn(A, B, C, D, E, F) -> Res + Clone + 'static,
<Res as Future>::Output: Responder,
impl<Func, A, B, C, D, E, Res> Handler<(A, B, C, D, E), Res> for Func where
Res: Future,
Func: Fn(A, B, C, D, E) -> Res + Clone + 'static,
<Res as Future>::Output: Responder,
impl<Func, A, B, C, D, Res> Handler<(A, B, C, D), Res> for Func where
Res: Future,
Func: Fn(A, B, C, D) -> Res + Clone + 'static,
<Res as Future>::Output: Responder,
impl<Func, A, B, C, Res> Handler<(A, B, C), Res> for Func where
Res: Future,
Func: Fn(A, B, C) -> Res + Clone + 'static,
<Res as Future>::Output: Responder,
impl<Func, A, B, Res> Handler<(A, B), Res> for Func where
Res: Future,
Func: Fn(A, B) -> Res + Clone + 'static,
<Res as Future>::Output: Responder,
impl<Func, A, Res> Handler<(A,), Res> for Func where
Res: Future,
Func: Fn(A) -> Res + Clone + 'static,
<Res as Future>::Output: Responder,
impl<Func, Res> Handler<(), Res> for Func where
Res: Future,
Func: Fn() -> Res + Clone + 'static,
<Res as Future>::Output: Responder,
impl<H, D, R, E, I, O> Handler<(HttpRequest, Data<D>, Json<I>), R> for JsonHandlerWrapper<H, D, R, E, I, O> where
H: Handler<D, R, E, I, O> + Clone + 'static,
D: 'static,
R: Future<Output = Result<Json<O>, E>> + 'static,
E: ResponseError + 'static,
I: Serialize + DeserializeOwned + 'static,
O: Serialize + DeserializeOwned + 'static,
impl<H, D, R, E, I, O> Handler<(HttpRequest, Data<D>, Query<I>), R> for QueryHandlerWrapper<H, D, R, E, I, O> where
H: Handler<D, R, E, I, O> + Clone + 'static,
D: 'static,
R: Future<Output = Result<Json<O>, E>> + 'static,
E: ResponseError + 'static,
I: Serialize + DeserializeOwned + 'static,
O: Serialize + DeserializeOwned + 'static,