pub struct SessionRetryPolicy { /* private fields */ }
Expand description
Session retry policy.
Configure the maximum delay between reconnect attempts, the initial delay between reconnect attempts, and the maximum number of reconnect attempts.
Implementations§
Source§impl SessionRetryPolicy
impl SessionRetryPolicy
Sourcepub const DEFAULT_RETRY_LIMIT: u32 = 10u32
pub const DEFAULT_RETRY_LIMIT: u32 = 10u32
Default maximum number of retries.
Sourcepub const DEFAULT_INITIAL_SLEEP_MS: u64 = 500u64
pub const DEFAULT_INITIAL_SLEEP_MS: u64 = 500u64
Default initial delay between requests in milliseconds.
Sourcepub const DEFAULT_MAX_SLEEP_MS: u64 = 30_000u64
pub const DEFAULT_MAX_SLEEP_MS: u64 = 30_000u64
Default maximum delay between requests in milliseconds.
Sourcepub fn new(
max_sleep: Duration,
retry_limit: Option<u32>,
initial_sleep: Duration,
) -> Self
pub fn new( max_sleep: Duration, retry_limit: Option<u32>, initial_sleep: Duration, ) -> Self
Create a new session retry policy.
Trait Implementations§
Source§impl Clone for SessionRetryPolicy
impl Clone for SessionRetryPolicy
Source§fn clone(&self) -> SessionRetryPolicy
fn clone(&self) -> SessionRetryPolicy
Returns a duplicate of the value. Read more
1.0.0 · 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 SessionRetryPolicy
impl Debug for SessionRetryPolicy
Auto Trait Implementations§
impl Freeze for SessionRetryPolicy
impl RefUnwindSafe for SessionRetryPolicy
impl Send for SessionRetryPolicy
impl Sync for SessionRetryPolicy
impl Unpin for SessionRetryPolicy
impl UnwindSafe for SessionRetryPolicy
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