[][src]Struct modbus::tcp::Config

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,
}

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

impl Clone for Config[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Copy for Config[src]

impl Default for Config[src]

Auto Trait Implementations

impl Sync for Config

impl Unpin for Config

impl Send for Config

impl UnwindSafe for Config

impl RefUnwindSafe for Config

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]