pub enum ModbusConfig {
Tcp(ModbusTcpConfig),
Serial(ModbusSerialConfig),
}Expand description
Top-level configuration for Modbus communication, supporting different transport layers.
Variants§
Tcp(ModbusTcpConfig)
Configuration for Modbus TCP/IP.
Serial(ModbusSerialConfig)
Configuration for Modbus Serial (RTU or ASCII).
Implementations§
Source§impl ModbusConfig
Implements common functionality for ModbusConfig.
impl ModbusConfig
Implements common functionality for ModbusConfig.
Sourcepub fn retry_attempts(&self) -> u8
pub fn retry_attempts(&self) -> u8
Returns the number of retry attempts configured for the transport.
Sourcepub fn retry_backoff_strategy(&self) -> BackoffStrategy
pub fn retry_backoff_strategy(&self) -> BackoffStrategy
Returns the configured retry backoff strategy.
Sourcepub fn retry_jitter_strategy(&self) -> JitterStrategy
pub fn retry_jitter_strategy(&self) -> JitterStrategy
Returns the configured retry jitter strategy.
Sourcepub fn retry_random_fn(&self) -> Option<RetryRandomFn>
pub fn retry_random_fn(&self) -> Option<RetryRandomFn>
Returns the optional application-provided random callback for jitter.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModbusConfig
impl RefUnwindSafe for ModbusConfig
impl Send for ModbusConfig
impl Sync for ModbusConfig
impl Unpin for ModbusConfig
impl UnsafeUnpin for ModbusConfig
impl UnwindSafe for ModbusConfig
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
Mutably borrows from an owned value. Read more