wait_for

Function wait_for 

Source
pub async fn wait_for<F>(timeout: Duration, interval: Duration, condition: F)
where F: FnMut() -> bool,
Expand description

Wait for a condition to become true.

Polls the condition function at regular intervals until it returns true or the timeout is reached.

ยงPanics

Panics if the condition is not met within the timeout.