Skip to main content

bunnydb_rs/
options.rs

1/// Configures HTTP timeout and retry behavior.
2#[derive(Clone, Debug, Eq, PartialEq)]
3pub struct ClientOptions {
4    /// Per-request timeout in milliseconds.
5    pub timeout_ms: u64,
6    /// Maximum number of retries after the initial attempt.
7    pub max_retries: usize,
8    /// Base retry backoff in milliseconds (exponential strategy).
9    pub retry_backoff_ms: u64,
10}
11
12impl Default for ClientOptions {
13    fn default() -> Self {
14        Self {
15            timeout_ms: 10_000,
16            max_retries: 0,
17            retry_backoff_ms: 250,
18        }
19    }
20}