pub async fn wait_for<F, Fut>( check: F, interval: Duration, max_wait: Duration, ) -> boolwhere F: Fn() -> Fut, Fut: Future<Output = bool>,
Wait for a condition with timeout - condition-based, not time-based