pub enum Retries {
UntilHalted,
AtMost(u32),
}Expand description
The ceiling a person set on retrying one endpoint.
Exhaustive rather than a count with a sentinel: “keep trying until somebody stops this” and “try four times” are different intentions, and a number cannot spell the first one.
Variants§
UntilHalted
No ceiling. What stops the run is Halt, the city’s one brake.
This is what a person who settled nothing asked for.
AtMost(u32)
Give up once this many retries have been spent. Zero is a real answer and means “once, then report”.
Implementations§
Source§impl Retries
impl Retries
Sourcepub const fn without_a_brake(self) -> u32
pub const fn without_a_brake(self) -> u32
How many retries a request gets where nothing can halt it.
A person watching a settings page is waiting on one request and
holds no brake, so UntilHalted cannot be honoured literally
there: a probe that retried forever would hang the page it was
drawn for. It is honoured as one retry, which is what a
dropped connection costs and what the probe already documented
as its intent — written here so the reading is the setting’s own
and not a second default at the call site.