pub async fn wait_for_condition<F>(
condition: F,
timeout: Duration,
poll_interval: Duration,
timeout_message: &str,
)Expand description
Wait for a condition to become true, polling at regular intervals
§Arguments
condition- A closure that returns true when the wait should endtimeout- Maximum time to wait before panickingpoll_interval- How often to check the conditiontimeout_message- Message to display if timeout occurs
§Panics
Panics if the condition doesn’t become true within the timeout period