Skip to main content

async_endpoint_middleware

Function async_endpoint_middleware 

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

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