Skip to main content

IntoHandler

Trait IntoHandler 

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

Trait to convert functions into handlers

Required Methods§

Source

fn into_handler(self) -> AnyHandler

Convert this function into a type-erased handler

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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