Skip to main content

async_auth_handler

Function async_auth_handler 

Source
pub fn async_auth_handler<F, Fut>(
    handler: F,
) -> impl for<'a> Fn(&'a AuthContext, ApiRequest) -> EndpointFuture<'a> + Send + Sync + Clone + 'static
where F: Fn(AuthContext, ApiRequest) -> Fut + Send + Sync + Clone + 'static, Fut: Future<Output = Result<ApiResponse, RustAuthError>> + Send + 'static,
Expand description

Wraps an async handler so endpoint authors do not need Box::pin.