qubit_http/error/retry_hint.rs
1/*******************************************************************************
2 *
3 * Copyright (c) 2025 - 2026.
4 * Haixing Hu, Qubit Co. Ltd.
5 *
6 * All rights reserved.
7 *
8 ******************************************************************************/
9//! # Retry Hint
10//!
11//! Provides lightweight retryability classification for HTTP errors.
12//!
13//! # Author
14//!
15//! Haixing Hu
16
17/// High-level classification from [`crate::HttpError::retry_hint`] for backoff policies.
18#[derive(Debug, Clone, Copy, PartialEq, Eq)]
19pub enum RetryHint {
20 /// Transient failure (timeouts, some 5xx/429, transport); callers may retry with care.
21 Retryable,
22 /// Permanent or non-idempotent failure; do not retry by default.
23 NonRetryable,
24}