pub struct ManagedWsConfigBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> ManagedWsConfigBuilder<S>
impl<S: State> ManagedWsConfigBuilder<S>
Sourcepub fn build(self) -> ManagedWsConfigwhere
S: IsComplete,
pub fn build(self) -> ManagedWsConfigwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn initial_backoff(
self,
value: Duration,
) -> ManagedWsConfigBuilder<SetInitialBackoff<S>>where
S::InitialBackoff: IsUnset,
pub fn initial_backoff(
self,
value: Duration,
) -> ManagedWsConfigBuilder<SetInitialBackoff<S>>where
S::InitialBackoff: IsUnset,
Sourcepub fn maybe_initial_backoff(
self,
value: Option<Duration>,
) -> ManagedWsConfigBuilder<SetInitialBackoff<S>>where
S::InitialBackoff: IsUnset,
pub fn maybe_initial_backoff(
self,
value: Option<Duration>,
) -> ManagedWsConfigBuilder<SetInitialBackoff<S>>where
S::InitialBackoff: IsUnset,
Sourcepub fn max_backoff(
self,
value: Duration,
) -> ManagedWsConfigBuilder<SetMaxBackoff<S>>where
S::MaxBackoff: IsUnset,
pub fn max_backoff(
self,
value: Duration,
) -> ManagedWsConfigBuilder<SetMaxBackoff<S>>where
S::MaxBackoff: IsUnset,
Sourcepub fn maybe_max_backoff(
self,
value: Option<Duration>,
) -> ManagedWsConfigBuilder<SetMaxBackoff<S>>where
S::MaxBackoff: IsUnset,
pub fn maybe_max_backoff(
self,
value: Option<Duration>,
) -> ManagedWsConfigBuilder<SetMaxBackoff<S>>where
S::MaxBackoff: IsUnset,
Sourcepub fn max_retries(self, value: u32) -> ManagedWsConfigBuilder<SetMaxRetries<S>>where
S::MaxRetries: IsUnset,
pub fn max_retries(self, value: u32) -> ManagedWsConfigBuilder<SetMaxRetries<S>>where
S::MaxRetries: IsUnset,
Sourcepub fn maybe_max_retries(
self,
value: Option<u32>,
) -> ManagedWsConfigBuilder<SetMaxRetries<S>>where
S::MaxRetries: IsUnset,
pub fn maybe_max_retries(
self,
value: Option<u32>,
) -> ManagedWsConfigBuilder<SetMaxRetries<S>>where
S::MaxRetries: IsUnset,
Sourcepub fn channel_capacity(
self,
value: usize,
) -> ManagedWsConfigBuilder<SetChannelCapacity<S>>where
S::ChannelCapacity: IsUnset,
pub fn channel_capacity(
self,
value: usize,
) -> ManagedWsConfigBuilder<SetChannelCapacity<S>>where
S::ChannelCapacity: IsUnset,
Sourcepub fn maybe_channel_capacity(
self,
value: Option<usize>,
) -> ManagedWsConfigBuilder<SetChannelCapacity<S>>where
S::ChannelCapacity: IsUnset,
pub fn maybe_channel_capacity(
self,
value: Option<usize>,
) -> ManagedWsConfigBuilder<SetChannelCapacity<S>>where
S::ChannelCapacity: IsUnset,
Sourcepub fn ws_config(
self,
value: WebsocketConfig,
) -> ManagedWsConfigBuilder<SetWsConfig<S>>where
S::WsConfig: IsUnset,
pub fn ws_config(
self,
value: WebsocketConfig,
) -> ManagedWsConfigBuilder<SetWsConfig<S>>where
S::WsConfig: IsUnset,
Sourcepub fn maybe_ws_config(
self,
value: Option<WebsocketConfig>,
) -> ManagedWsConfigBuilder<SetWsConfig<S>>where
S::WsConfig: IsUnset,
pub fn maybe_ws_config(
self,
value: Option<WebsocketConfig>,
) -> ManagedWsConfigBuilder<SetWsConfig<S>>where
S::WsConfig: IsUnset,
Sourcepub fn idle_timeout(
self,
value: Duration,
) -> ManagedWsConfigBuilder<SetIdleTimeout<S>>where
S::IdleTimeout: IsUnset,
pub fn idle_timeout(
self,
value: Duration,
) -> ManagedWsConfigBuilder<SetIdleTimeout<S>>where
S::IdleTimeout: IsUnset,
Optional (Some / Option setters).
Default: Duration::from_secs(60).
Force a reconnect if no server message arrives within this window.
Protects against zombie connections — TCP keepalives and WebSocket ping/pong keep the socket nominally alive, but the server can stop sending data without closing. Without this, the handle sits on a dead stream indefinitely.
Duration::ZERO disables the timer. Cmd-path acks (subscribe, order
responses) DO count as server-pushed messages and reset the clock.
Default: 60 seconds
Sourcepub fn maybe_idle_timeout(
self,
value: Option<Duration>,
) -> ManagedWsConfigBuilder<SetIdleTimeout<S>>where
S::IdleTimeout: IsUnset,
pub fn maybe_idle_timeout(
self,
value: Option<Duration>,
) -> ManagedWsConfigBuilder<SetIdleTimeout<S>>where
S::IdleTimeout: IsUnset,
Optional (Some / Option setters).
Default: Duration::from_secs(60).
Force a reconnect if no server message arrives within this window.
Protects against zombie connections — TCP keepalives and WebSocket ping/pong keep the socket nominally alive, but the server can stop sending data without closing. Without this, the handle sits on a dead stream indefinitely.
Duration::ZERO disables the timer. Cmd-path acks (subscribe, order
responses) DO count as server-pushed messages and reset the clock.
Default: 60 seconds
Sourcepub fn backoff_reset_after(
self,
value: Duration,
) -> ManagedWsConfigBuilder<SetBackoffResetAfter<S>>where
S::BackoffResetAfter: IsUnset,
pub fn backoff_reset_after(
self,
value: Duration,
) -> ManagedWsConfigBuilder<SetBackoffResetAfter<S>>where
S::BackoffResetAfter: IsUnset,
Optional (Some / Option setters).
Default: Duration::from_secs(30).
How long a connection must stay up before the backoff state is
considered “stable” and the next disconnect starts from
initial_backoff again.
Without this, a zombie that accepts connections and immediately drops
would be hammered at initial_backoff forever — the server never gets
the exponential-backoff relief.
Default: 30 seconds
Sourcepub fn maybe_backoff_reset_after(
self,
value: Option<Duration>,
) -> ManagedWsConfigBuilder<SetBackoffResetAfter<S>>where
S::BackoffResetAfter: IsUnset,
pub fn maybe_backoff_reset_after(
self,
value: Option<Duration>,
) -> ManagedWsConfigBuilder<SetBackoffResetAfter<S>>where
S::BackoffResetAfter: IsUnset,
Optional (Some / Option setters).
Default: Duration::from_secs(30).
How long a connection must stay up before the backoff state is
considered “stable” and the next disconnect starts from
initial_backoff again.
Without this, a zombie that accepts connections and immediately drops
would be hammered at initial_backoff forever — the server never gets
the exponential-backoff relief.
Default: 30 seconds