Trait rodbus::RetryStrategy
source · pub trait RetryStrategy: Send {
fn reset(&mut self);
fn after_failed_connect(&mut self) -> Duration;
fn after_disconnect(&mut self) -> Duration;
}Expand description
Trait that controls how the channel retries failed connect (TCP/TLS) or open (serial) attempts
Required Methods§
sourcefn reset(&mut self)
fn reset(&mut self)
Reset internal state. Called when a connection is successful or a port is opened
sourcefn after_failed_connect(&mut self) -> Duration
fn after_failed_connect(&mut self) -> Duration
Return the next delay before making another connection/open attempt
sourcefn after_disconnect(&mut self) -> Duration
fn after_disconnect(&mut self) -> Duration
Return the delay to wait after a disconnect before attempting to reconnect/open