Skip to main content

wrap_async_condition

Function wrap_async_condition 

Source
pub fn wrap_async_condition<F, Fut, R>(
    f: F,
) -> Arc<dyn Fn(&Value) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send>> + Send + Sync> ⓘ
where F: Fn(&Value) -> Fut + Send + Sync + 'static, Fut: Future<Output = R> + Send + 'static, R: IntoConditionResult,
Expand description

Wrap an async predicate into a Condition. The future may resolve to bool or Result<bool> (see IntoConditionResult).