pub struct ModbusServerConfig {
pub bind_address: SocketAddr,
pub max_connections: usize,
pub timeout_secs: u64,
pub keep_alive: bool,
pub tcp_nodelay: bool,
pub rate_limit: u32,
}Expand description
Modbus TCP server configuration.
Fields§
§bind_address: SocketAddrBind address.
max_connections: usizeMaximum concurrent connections.
timeout_secs: u64Connection timeout.
keep_alive: boolEnable TCP keep-alive.
tcp_nodelay: boolTCP nodelay (disable Nagle algorithm).
rate_limit: u32Maximum requests per second per connection (0 = unlimited).
Implementations§
Source§impl ModbusServerConfig
impl ModbusServerConfig
Sourcepub fn with_bind_address(self, addr: SocketAddr) -> Self
pub fn with_bind_address(self, addr: SocketAddr) -> Self
Create a new config with the specified bind address.
Sourcepub fn with_max_connections(self, max: usize) -> Self
pub fn with_max_connections(self, max: usize) -> Self
Set maximum connections.
Trait Implementations§
Source§impl Clone for ModbusServerConfig
impl Clone for ModbusServerConfig
Source§fn clone(&self) -> ModbusServerConfig
fn clone(&self) -> ModbusServerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModbusServerConfig
impl Debug for ModbusServerConfig
Source§impl Default for ModbusServerConfig
impl Default for ModbusServerConfig
Source§impl<'de> Deserialize<'de> for ModbusServerConfig
impl<'de> Deserialize<'de> for ModbusServerConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ModbusServerConfig> for ServerConfigV2
impl From<ModbusServerConfig> for ServerConfigV2
Source§fn from(config: ModbusServerConfig) -> Self
fn from(config: ModbusServerConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ModbusServerConfig
impl RefUnwindSafe for ModbusServerConfig
impl Send for ModbusServerConfig
impl Sync for ModbusServerConfig
impl Unpin for ModbusServerConfig
impl UnsafeUnpin for ModbusServerConfig
impl UnwindSafe for ModbusServerConfig
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