pub struct StreamConnectConfig {
pub tracking_id: String,
pub responses_debounced: bool,
pub reconnect: ReconnectConfig,
pub idle_timeout: Option<Duration>,
}Fields§
§tracking_id: String§responses_debounced: bool§reconnect: ReconnectConfig§idle_timeout: Option<Duration>Tear down and reconnect if no frame arrives from the server within this
window. Defaults to 60 seconds; None disables the check.
Without this, a TCP connection that dies silently (no FIN, no RST — the
common case behind NAT timeouts and load-balancer drops) leaves the
stream blocked forever and reconnect never fires. Subscribing to
StreamSubscription::heartbeat guarantees regular traffic to feed it.
Implementations§
Source§impl StreamConnectConfig
impl StreamConnectConfig
pub fn with_tracking_id(self, tracking_id: impl Into<String>) -> Self
pub fn with_responses_debounced(self, responses_debounced: bool) -> Self
pub fn with_reconnect(self, reconnect: ReconnectConfig) -> Self
Sourcepub fn with_idle_timeout(self, idle_timeout: Option<Duration>) -> Self
pub fn with_idle_timeout(self, idle_timeout: Option<Duration>) -> Self
Set the idle timeout. Pass None to disable dead-connection detection.
Trait Implementations§
Source§impl Clone for StreamConnectConfig
impl Clone for StreamConnectConfig
Source§fn clone(&self) -> StreamConnectConfig
fn clone(&self) -> StreamConnectConfig
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 StreamConnectConfig
impl Debug for StreamConnectConfig
Auto Trait Implementations§
impl Freeze for StreamConnectConfig
impl RefUnwindSafe for StreamConnectConfig
impl Send for StreamConnectConfig
impl Sync for StreamConnectConfig
impl Unpin for StreamConnectConfig
impl UnsafeUnpin for StreamConnectConfig
impl UnwindSafe for StreamConnectConfig
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