Skip to main content

IntoHandler

Trait IntoHandler 

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

Convert async functions into a FallibleHandler.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl IntoHandler<()> for FallibleHandler

Source§

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

Source§

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

Source§

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

Source§

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