pub struct StoreConfig {
pub coil_count: usize,
pub discrete_input_count: usize,
pub holding_register_count: usize,
pub input_register_count: usize,
}Expand description
Configuration for the in-memory data store.
Fields§
§coil_count: usizeNumber of coils (address space size). Default: 65536.
discrete_input_count: usizeNumber of discrete inputs. Default: 65536.
holding_register_count: usizeNumber of holding registers. Default: 65536.
input_register_count: usizeNumber of input registers. Default: 65536.
Implementations§
Source§impl StoreConfig
impl StoreConfig
Sourcepub fn validate(&self) -> Result<(), StoreError>
pub fn validate(&self) -> Result<(), StoreError>
Validate configured table sizes before allocating backing vectors.
§Errors
Returns StoreError::TableTooLarge if any table exceeds the 16-bit
Modbus address space.
Trait Implementations§
Source§impl Clone for StoreConfig
impl Clone for StoreConfig
Source§fn clone(&self) -> StoreConfig
fn clone(&self) -> StoreConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StoreConfig
impl Debug for StoreConfig
Auto Trait Implementations§
impl Freeze for StoreConfig
impl RefUnwindSafe for StoreConfig
impl Send for StoreConfig
impl Sync for StoreConfig
impl Unpin for StoreConfig
impl UnsafeUnpin for StoreConfig
impl UnwindSafe for StoreConfig
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