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§

Reset internal state. Called when a connection is successful or a port is opened

Return the next delay before making another connection/open attempt

Return the delay to wait after a disconnect before attempting to reconnect/open

Implementors§