pub struct Config {
pub tcp_port: u16,
pub tcp_connect_timeout: Option<Duration>,
pub tcp_read_timeout: Option<Duration>,
pub tcp_write_timeout: Option<Duration>,
pub modbus_uid: u8,
}
Expand description
Config structure for more control over the tcp socket settings
Fields§
§tcp_port: u16
The TCP port to use for communication (Default: 502
)
tcp_connect_timeout: Option<Duration>
Connection timeout for TCP socket (Default: OS Default
)
tcp_read_timeout: Option<Duration>
Timeout when reading from the TCP socket (Default: infinite
)
tcp_write_timeout: Option<Duration>
Timeout when writing to the TCP socket (Default: infinite
)
modbus_uid: u8
The modbus Unit Identifier used in the modbus layer (Default: 1
)
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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