pub struct RetryPolicy {
pub max_attempts: u8,
pub backoff_ms_min: u32,
pub backoff_ms_max: u32,
pub backoff_multiplier: f32,
pub backoff_cap_ms: u32,
pub per_attempt_timeout: Duration,
pub skip_cad: bool,
}Expand description
Policy for crate::Dongle::tx_with_retry.
Defaults match the example in PROTOCOL.md §C.5.5: 3 attempts,
randomized 20-100 ms backoff on the first retry, doubling up to
500 ms cap. Only CHANNEL_BUSY (CAD) and EBUSY (TX queue full)
trigger a retry — every other error propagates immediately.
Fields§
§max_attempts: u8§backoff_ms_min: u32Lower bound of the initial randomized backoff (ms).
backoff_ms_max: u32Upper bound of the initial randomized backoff (ms). The jitter
range is [0, backoff_ms_max - backoff_ms_min].
backoff_multiplier: f32Multiplier applied to the backoff floor on each subsequent retry (standard exponential backoff).
backoff_cap_ms: u32Absolute ceiling on the backoff floor (ms). Prevents runaway delays at high attempt counts.
per_attempt_timeout: DurationPer-attempt command deadline. Must accommodate CAD + airtime on the slowest configuration likely to be in play.
skip_cad: boolIf true, bypass CAD (sends skip_cad = 1). Usually false —
retrying without CAD defeats the purpose of the retry.
Trait Implementations§
Source§impl Clone for RetryPolicy
impl Clone for RetryPolicy
Source§fn clone(&self) -> RetryPolicy
fn clone(&self) -> RetryPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more