pub enum Idempotency {
Idempotent,
Unknown,
}Expand description
Whether a request is known to be safe to re-send.
Set by the call site, which knows the operation’s semantics; consumed by
HttpClient implementations when classifying transport failures as
retryable. The distinction matters for failures where the request may
have reached the server (a timeout, an interrupted response): re-sending
is only safe when the operation is known not to be affected by a first
attempt the server may already have processed.
Variants§
Idempotent
The request is known to be idempotent: a re-send is not affected by whether the server processed an earlier attempt. Transports may mark transient failures retryable even when delivery of the first attempt is unknown.
Unknown
Not known to be idempotent. A first attempt may have consumed one-shot state (an authorization code, a rotated refresh token), so transports must mark a failure retryable only when the request provably never reached the server.
Trait Implementations§
Source§impl Clone for Idempotency
impl Clone for Idempotency
Source§fn clone(&self) -> Idempotency
fn clone(&self) -> Idempotency
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more