Expand description
Retrying a failed operation. Not available on wasm32 — tokio’s time
driver, which the backoff needs, does not run there.
Retrying an operation that failed for a reason worth retrying.
The crate has carried a complete retryability classification with no
mechanism: DataflowError::retryable sorts every variant, and
ErrorInfo has retry_attempted / retry_count fields,
but no engine code path acts on any of it. Every host has written the same
loop.
This module supplies the loop. It is deliberately not engine-level
automatic retry: the engine cannot know which handlers are idempotent — an
SMTP send that times out after DATA is indistinguishable from one that
succeeded, and retrying duplicates the mail. Whether to retry stays a
per-handler, per-call-site decision; the crate just supplies the correct
loop for those that opt in.
§Not available on wasm32
Backoff needs a timer, and tokio’s time driver does not run on
wasm32-unknown-unknown. The whole module is cfg-gated off that target.
Structs§
- Retry
Policy - How hard to retry, and for how long overall.
Functions§
- retry_
with_ attempts - As
retry_with_policy, also reporting how many attempts were made. - retry_
with_ policy - Run
operation, retrying while it fails retryably and budget remains.