pub struct ConnectOptions {
pub max_attempts: u32,
pub backoff_base_ms: u64,
pub backoff_cap_ms: u64,
pub connect_timeout_ms: u64,
}Expand description
SP-concurrency-baseline §5.3 — controls AtdClient::connect retry behaviour.
Defaults are read from env (ATD_CONNECT_RETRIES,
ATD_CONNECT_BACKOFF_BASE_MS, ATD_CONNECT_BACKOFF_CAP_MS,
ATD_CONNECT_TIMEOUT_MS) so adopters tune deployments without code
edits. Construct manually for explicit control:
let opts = ConnectOptions { max_attempts: 3, backoff_base_ms: 100, backoff_cap_ms: 1000, connect_timeout_ms: 5000 };
let _c = AtdClient::connect_with_options(Endpoint::unix("/tmp/x.sock"), opts).await;Fields§
§max_attempts: u32Total connect attempts before giving up. Includes the initial try.
backoff_base_ms: u64Initial backoff after the first failed attempt, in ms.
backoff_cap_ms: u64Backoff is doubled per failure but capped at this value (ms).
connect_timeout_ms: u64Per-attempt deadline wrapping UnixStream::connect + ping.
Trait Implementations§
Source§impl Clone for ConnectOptions
impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConnectOptions
impl Debug for ConnectOptions
Auto Trait Implementations§
impl Freeze for ConnectOptions
impl RefUnwindSafe for ConnectOptions
impl Send for ConnectOptions
impl Sync for ConnectOptions
impl Unpin for ConnectOptions
impl UnsafeUnpin for ConnectOptions
impl UnwindSafe for ConnectOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more