pub fn wrap_sync_condition<R>(
f: impl Fn(&Value) -> R + Send + Sync + 'static,
) -> Arc<dyn Fn(&Value) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send>> + Send + Sync> ⓘwhere
R: IntoConditionResult,Expand description
Wrap a synchronous predicate into a Condition.
The closure may return bool or Result<bool> (see
IntoConditionResult). It is invoked eagerly, right when the condition
is called — not deferred inside the returned future — so wrapping does not
change evaluation order or timing for a sync call site; only the return
type becomes an (already-resolved) future.