Struct StreamConfig
pub struct StreamConfig {
pub max_reconnect_attempts: Option<u32>,
pub initial_reconnect_delay_ms: u64,
pub max_reconnect_delay_ms: u64,
pub idle_timeout_ms: u64,
pub buffer_size: usize,
pub overflow: Overflow,
}Expand description
How a live connection should behave when it degrades.
The defaults reconnect without a count limit, use exponential backoff, and
apply Overflow::Backpressure when the buffer fills.
Fields§
§max_reconnect_attempts: Option<u32>Maximum number of reconnect attempts.
Every reconnect counts; successful traffic does not reset the total.
None, the default, retries without a count limit. When a finite limit
is exhausted, the producer attempts to send Error::Transport
and then ends. Overflow::DropNewest may drop that final error when
the buffer is full, leaving None as the only termination signal.
initial_reconnect_delay_ms: u64Delay before the first reconnect attempt, in milliseconds.
Values below one millisecond are raised to one millisecond.
max_reconnect_delay_ms: u64Ceiling on the reconnect backoff, in milliseconds.
Values below one millisecond are raised to one millisecond.
idle_timeout_ms: u64Close and reconnect if nothing arrives for this long, in milliseconds.
An adapter may raise this to the minimum its exchange’s heartbeat can satisfy. A larger caller-provided value is preserved.
buffer_size: usizeHow many events to buffer for a consumer that has fallen behind.
Zero is raised to one.
overflow: OverflowWhat to do when the buffer is full.
Trait Implementations§
§impl Clone for StreamConfig
impl Clone for StreamConfig
§impl Debug for StreamConfig
impl Debug for StreamConfig
§impl Default for StreamConfig
impl Default for StreamConfig
impl Eq for StreamConfig
§impl PartialEq for StreamConfig
impl PartialEq for StreamConfig
impl StructuralPartialEq for StreamConfig
Auto Trait Implementations§
impl Freeze for StreamConfig
impl RefUnwindSafe for StreamConfig
impl Send for StreamConfig
impl Sync for StreamConfig
impl Unpin for StreamConfig
impl UnsafeUnpin for StreamConfig
impl UnwindSafe for StreamConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.