Skip to main content

IntoHandler

Trait IntoHandler 

Source
pub trait IntoHandler<State, Args>:
    Send
    + Sync
    + 'static {
    // Required method
    fn into_handler(self) -> Arc<dyn Handler<State>>;
}

Required Methods§

Source

fn into_handler(self) -> Arc<dyn Handler<State>>

Implementors§

Source§

impl<State, F, Fut, R> IntoHandler<State, ()> for F
where F: Send + Sync + 'static + Fn() -> Fut, Fut: Future<Output = R> + Send + 'static, R: IntoResponse, State: Send + Sync + 'static,

Source§

impl<State, F, Fut, R, T1> IntoHandler<State, (T1,)> for F
where F: Send + Sync + 'static + Fn(T1) -> Fut, Fut: Future<Output = R> + Send + 'static, R: IntoResponse, T1: FromRequest<State> + Send + 'static, State: Send + Sync + 'static,

Source§

impl<State, F, Fut, R, T1, T2> IntoHandler<State, (T1, T2)> for F
where F: Send + Sync + 'static + Fn(T1, T2) -> Fut, Fut: Future<Output = R> + Send + 'static, R: IntoResponse, T1: FromRequest<State> + Send + 'static, T2: FromRequest<State> + Send + 'static, State: Send + Sync + 'static,

Source§

impl<State, F, Fut, R, T1, T2, T3> IntoHandler<State, (T1, T2, T3)> for F
where F: Send + Sync + 'static + Fn(T1, T2, T3) -> Fut, Fut: Future<Output = R> + Send + 'static, R: IntoResponse, T1: FromRequest<State> + Send + 'static, T2: FromRequest<State> + Send + 'static, T3: FromRequest<State> + Send + 'static, State: Send + Sync + 'static,

Source§

impl<State, F, Fut, R, T1, T2, T3, T4> IntoHandler<State, (T1, T2, T3, T4)> for F
where F: Send + Sync + 'static + Fn(T1, T2, T3, T4) -> Fut, Fut: Future<Output = R> + Send + 'static, R: IntoResponse, T1: FromRequest<State> + Send + 'static, T2: FromRequest<State> + Send + 'static, T3: FromRequest<State> + Send + 'static, T4: FromRequest<State> + Send + 'static, State: Send + Sync + 'static,

Source§

impl<State, F, Fut, R, T1, T2, T3, T4, T5> IntoHandler<State, (T1, T2, T3, T4, T5)> for F
where F: Send + Sync + 'static + Fn(T1, T2, T3, T4, T5) -> Fut, Fut: Future<Output = R> + Send + 'static, R: IntoResponse, T1: FromRequest<State> + Send + 'static, T2: FromRequest<State> + Send + 'static, T3: FromRequest<State> + Send + 'static, T4: FromRequest<State> + Send + 'static, T5: FromRequest<State> + Send + 'static, State: Send + Sync + 'static,

Source§

impl<State, F, Fut, R, T1, T2, T3, T4, T5, T6> IntoHandler<State, (T1, T2, T3, T4, T5, T6)> for F
where F: Send + Sync + 'static + Fn(T1, T2, T3, T4, T5, T6) -> Fut, Fut: Future<Output = R> + Send + 'static, R: IntoResponse, T1: FromRequest<State> + Send + 'static, T2: FromRequest<State> + Send + 'static, T3: FromRequest<State> + Send + 'static, T4: FromRequest<State> + Send + 'static, T5: FromRequest<State> + Send + 'static, T6: FromRequest<State> + Send + 'static, State: Send + Sync + 'static,