pub struct BackoffConfig {
pub min_backoff_ms: u64,
pub max_backoff_ms: u64,
pub factor: u32,
pub jitter_percent: u8,
}Expand description
Exponential backoff configuration for reconnecting streaming sessions.
Fields§
§min_backoff_ms: u64Minimum backoff delay in milliseconds.
max_backoff_ms: u64Maximum backoff delay in milliseconds.
factor: u32Exponential factor to increase delay after each failure (>= 1).
jitter_percent: u8Random jitter percentage [0, 100] added to each delay.
Trait Implementations§
Source§impl Clone for BackoffConfig
impl Clone for BackoffConfig
Source§fn clone(&self) -> BackoffConfig
fn clone(&self) -> BackoffConfig
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 BackoffConfig
impl Debug for BackoffConfig
Source§impl Default for BackoffConfig
impl Default for BackoffConfig
Source§fn default() -> BackoffConfig
fn default() -> BackoffConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BackoffConfig
impl<'de> Deserialize<'de> for BackoffConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BackoffConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BackoffConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for BackoffConfig
impl Serialize for BackoffConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for BackoffConfig
Auto Trait Implementations§
impl Freeze for BackoffConfig
impl RefUnwindSafe for BackoffConfig
impl Send for BackoffConfig
impl Sync for BackoffConfig
impl Unpin for BackoffConfig
impl UnwindSafe for BackoffConfig
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