Struct fred::types::UnresponsiveConfig
source · pub struct UnresponsiveConfig {
pub max_timeout: Option<Duration>,
pub interval: Duration,
}Expand description
Configuration options used to detect potentially unresponsive connections.
Fields§
§max_timeout: Option<Duration>If provided, the amount of time a frame can wait without a response before the associated connection is considered unresponsive.
If a connection is considered unresponsive it will be forcefully closed and the client will reconnect based on the ReconnectPolicy. This heuristic can be useful in environments where connections may close or change in subtle or unexpected ways.
Unlike the timeout and default_command_timeout interfaces, any in-flight commands waiting on a response when the connection is closed this way will be retried based on the associated ReconnectPolicy and Options.
Default: None
interval: DurationThe frequency at which the client checks for unresponsive connections.
This value should usually be less than half of max_timeout and always more than 1 ms.
Default: 2 sec
Trait Implementations§
source§impl Clone for UnresponsiveConfig
impl Clone for UnresponsiveConfig
source§fn clone(&self) -> UnresponsiveConfig
fn clone(&self) -> UnresponsiveConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for UnresponsiveConfig
impl Debug for UnresponsiveConfig
source§impl Default for UnresponsiveConfig
impl Default for UnresponsiveConfig
source§impl PartialEq for UnresponsiveConfig
impl PartialEq for UnresponsiveConfig
impl Eq for UnresponsiveConfig
impl StructuralPartialEq for UnresponsiveConfig
Auto Trait Implementations§
impl Freeze for UnresponsiveConfig
impl RefUnwindSafe for UnresponsiveConfig
impl Send for UnresponsiveConfig
impl Sync for UnresponsiveConfig
impl Unpin for UnresponsiveConfig
impl UnwindSafe for UnresponsiveConfig
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more