Skip to main content

IntoHandler

Trait IntoHandler 

Source
pub trait IntoHandler<Args> {
    // Required method
    fn into_handler(self) -> BoxedHandler;
}
Expand description

Trait to convert functions into handlers

Required Methods§

Source

fn into_handler(self) -> BoxedHandler

Convert this function into a boxed handler

Implementors§

Source§

impl<F, Fut, R> IntoHandler<()> for F
where F: Fn() -> Fut + HandlerFnBounds + 'static, Fut: HandlerFutureBounds<Output = R> + 'static, R: IntoResponse + 'static,

Source§

impl<F, Fut, T1, R> IntoHandler<(T1,)> for F
where F: Fn(T1) -> Fut + HandlerFnBounds + 'static, Fut: HandlerFutureBounds<Output = R> + 'static, T1: FromContext + 'static, R: IntoResponse + 'static,

Source§

impl<F, Fut, T1, T2, R> IntoHandler<(T1, T2)> for F
where F: Fn(T1, T2) -> Fut + HandlerFnBounds + 'static, Fut: HandlerFutureBounds<Output = R> + 'static, T1: FromContext + 'static, T2: FromContext + 'static, R: IntoResponse + 'static,

Source§

impl<F, Fut, T1, T2, T3, R> IntoHandler<(T1, T2, T3)> for F
where F: Fn(T1, T2, T3) -> Fut + HandlerFnBounds + 'static, Fut: HandlerFutureBounds<Output = R> + 'static, T1: FromContext + 'static, T2: FromContext + 'static, T3: FromContext + 'static, R: IntoResponse + 'static,

Source§

impl<F, Fut, T1, T2, T3, T4, R> IntoHandler<(T1, T2, T3, T4)> for F
where F: Fn(T1, T2, T3, T4) -> Fut + HandlerFnBounds + 'static, Fut: HandlerFutureBounds<Output = R> + 'static, T1: FromContext + 'static, T2: FromContext + 'static, T3: FromContext + 'static, T4: FromContext + 'static, R: IntoResponse + 'static,