Function wait_for_condition
Source pub async fn wait_for_condition<F>(
timeout: Duration,
condition: F,
) -> Result<(), &'static str>
Available on crate feature testing
only.
Expand description
Wait for a condition with timeout
§Arguments
timeout
- The timeout for the wait
condition
- The condition to wait for
§Errors
Returns an error if the condition timed out