pub async fn poll_until<F, Fut>(
check: F,
max_wait: Duration,
poll_interval: Duration,
operation_name: &str,
) -> Result<bool>Expand description
Polls until a condition is met or timeout is reached.
This helper provides a reusable abstraction for waiting on async conditions with configurable timeout and polling interval.
§Arguments
check- Closure that returnsOk(true)when condition is met,Ok(false)to continue pollingmax_wait- Maximum time to wait before giving uppoll_interval- Time to sleep between pollsoperation_name- Name of the operation for logging
§Returns
Ok(true)- Condition was met within timeoutOk(false)- Timeout reached without condition being met (errors are logged and polling continues)