pub enum ConfigUpdate {
Show 14 variants
MaxConnections(usize),
IdleTimeout(Duration),
RequestTimeout(Duration),
UnitEnabled {
unit_id: u8,
enabled: bool,
},
TcpNoDelay(bool),
KeepaliveInterval(Option<Duration>),
RegisterReadAccess {
unit_id: u8,
start_address: u16,
count: u16,
allowed: bool,
},
RegisterWriteAccess {
unit_id: u8,
start_address: u16,
count: u16,
allowed: bool,
},
SetRegister {
unit_id: u8,
address: u16,
value: u16,
},
SetRegisters {
unit_id: u8,
start_address: u16,
values: Vec<u16>,
},
SetCoil {
unit_id: u8,
address: u16,
value: bool,
},
MetricsEnabled(bool),
DebugLogging(bool),
Custom {
key: String,
value: String,
},
}Expand description
Dynamic configuration value that can be changed at runtime.
Variants§
MaxConnections(usize)
Update maximum concurrent connections.
IdleTimeout(Duration)
Update connection idle timeout.
RequestTimeout(Duration)
Update request timeout.
UnitEnabled
Enable/disable a specific unit ID.
TcpNoDelay(bool)
Update TCP nodelay setting.
KeepaliveInterval(Option<Duration>)
Update keepalive interval.
RegisterReadAccess
Update register read access for a range.
RegisterWriteAccess
Update register write access for a range.
SetRegister
Set a register value.
SetRegisters
Set multiple register values.
SetCoil
Set a coil value.
MetricsEnabled(bool)
Enable/disable metrics collection.
DebugLogging(bool)
Enable/disable debug logging.
Custom
Custom extension for protocol-specific settings.
Implementations§
Source§impl ConfigUpdate
impl ConfigUpdate
Sourcepub fn category(&self) -> UpdateCategory
pub fn category(&self) -> UpdateCategory
Get the category of this update.
Sourcepub fn requires_restart(&self) -> bool
pub fn requires_restart(&self) -> bool
Check if this update requires a restart to take effect.
Trait Implementations§
Source§impl Clone for ConfigUpdate
impl Clone for ConfigUpdate
Source§fn clone(&self) -> ConfigUpdate
fn clone(&self) -> ConfigUpdate
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 ConfigUpdate
impl Debug for ConfigUpdate
Source§impl<'de> Deserialize<'de> for ConfigUpdate
impl<'de> Deserialize<'de> for ConfigUpdate
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
Auto Trait Implementations§
impl Freeze for ConfigUpdate
impl RefUnwindSafe for ConfigUpdate
impl Send for ConfigUpdate
impl Sync for ConfigUpdate
impl Unpin for ConfigUpdate
impl UnsafeUnpin for ConfigUpdate
impl UnwindSafe for ConfigUpdate
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