pub struct Options { /* private fields */ }Expand description
Heartbeat, retry, timeout, buffering, and telemetry settings.
Implementations§
Source§impl Options
impl Options
Sourcepub fn heartbeat_interval(self, interval: Duration) -> Self
pub fn heartbeat_interval(self, interval: Duration) -> Self
Sets how often the connected driver sends automatic heartbeats.
Sourcepub fn heartbeat_timeout(self, timeout: Duration) -> Self
pub fn heartbeat_timeout(self, timeout: Duration) -> Self
Sets how long an automatic heartbeat acknowledgement may take.
Sourcepub fn connect_timeout(self, timeout: Duration) -> Self
pub fn connect_timeout(self, timeout: Duration) -> Self
Sets the maximum duration of one transport connection attempt.
Sourcepub fn request_timeout(self, timeout: Duration) -> Self
pub fn request_timeout(self, timeout: Duration) -> Self
Sets the join, call, and leave timeout to one common value.
Sourcepub fn join_timeout(self, timeout: Duration) -> Self
pub fn join_timeout(self, timeout: Duration) -> Self
Sets the default channel join timeout.
Sourcepub fn call_timeout(self, timeout: Duration) -> Self
pub fn call_timeout(self, timeout: Duration) -> Self
Sets the default correlated call timeout.
Sourcepub fn leave_timeout(self, timeout: Duration) -> Self
pub fn leave_timeout(self, timeout: Duration) -> Self
Sets the default channel leave timeout.
Sourcepub fn reconnect_delay(self, delay: impl Fn(u32) -> Duration + 'static) -> Self
pub fn reconnect_delay(self, delay: impl Fn(u32) -> Duration + 'static) -> Self
Sets the delay function used by the default reconnect policy.
Sourcepub fn reconnect_policy(
self,
policy: impl Fn(ReconnectContext) -> ReconnectAction + 'static,
) -> Self
pub fn reconnect_policy( self, policy: impl Fn(ReconnectContext) -> ReconnectAction + 'static, ) -> Self
Installs a policy that classifies every disconnect and selects a retry.
Sourcepub fn rejoin_delay(self, delay: impl Fn(u32) -> Duration + 'static) -> Self
pub fn rejoin_delay(self, delay: impl Fn(u32) -> Duration + 'static) -> Self
Sets the delay before each automatic channel rejoin attempt.
Sourcepub fn command_capacity(self, capacity: usize) -> Self
pub fn command_capacity(self, capacity: usize) -> Self
Sets the bounded capacity of the driver command queue.
Sourcepub fn push_buffer_capacity(self, capacity: usize) -> Self
pub fn push_buffer_capacity(self, capacity: usize) -> Self
Sets how many calls may wait for a socket connection or channel join.
Sourcepub fn event_capacity(self, capacity: usize) -> Self
pub fn event_capacity(self, capacity: usize) -> Self
Sets the capacity of each socket or channel event subscriber.
Sourcepub fn connect_on_start(self, enabled: bool) -> Self
pub fn connect_on_start(self, enabled: bool) -> Self
Selects whether the driver connects immediately when it starts.
Sourcepub fn telemetry(self, hook: TelemetryHook) -> Self
pub fn telemetry(self, hook: TelemetryHook) -> Self
Installs a callback for structured client telemetry.