pub struct ModbusSimulatorConfig {
pub defaults: SimulatorDefaults,
pub transports: BTreeMap<String, TransportDefinition>,
pub datastores: BTreeMap<String, DatastoreDefinition>,
pub devices: BTreeMap<String, DeviceBundleDefinition>,
pub sessions: BTreeMap<String, SessionDefinition>,
pub presets: BTreeMap<String, GeneratedPresetDefinition>,
pub actions: BTreeMap<String, ActionDefinition>,
pub behaviors: BTreeMap<String, BehaviorDefinition>,
pub response_profiles: BTreeMap<String, ResponseProfileDefinition>,
}Expand description
Canonical session-centric config surface for the Modbus simulator.
Fields§
§defaults: SimulatorDefaults§transports: BTreeMap<String, TransportDefinition>§datastores: BTreeMap<String, DatastoreDefinition>§devices: BTreeMap<String, DeviceBundleDefinition>§sessions: BTreeMap<String, SessionDefinition>§presets: BTreeMap<String, GeneratedPresetDefinition>§actions: BTreeMap<String, ActionDefinition>§behaviors: BTreeMap<String, BehaviorDefinition>§response_profiles: BTreeMap<String, ResponseProfileDefinition>Implementations§
Source§impl ModbusSimulatorConfig
impl ModbusSimulatorConfig
Sourcepub fn from_path(path: &Path) -> ModbusResult<Self>
pub fn from_path(path: &Path) -> ModbusResult<Self>
Loads a simulator config from a YAML, JSON, or TOML file.
Sourcepub fn from_str_with_format(content: &str, format: &str) -> ModbusResult<Self>
pub fn from_str_with_format(content: &str, format: &str) -> ModbusResult<Self>
Parses a config from the supplied content and file-format hint.
Sourcepub fn validate(&self) -> ModbusResult<()>
pub fn validate(&self) -> ModbusResult<()>
Validates references and compile-time invariants across the config.
Sourcepub fn compile_session(&self, name: &str) -> ModbusResult<CompiledModbusSession>
pub fn compile_session(&self, name: &str) -> ModbusResult<CompiledModbusSession>
Compiles a named session into a runtime launch spec and DX metadata.
Sourcepub fn inspect_summary(&self) -> ModbusConfigSummary
pub fn inspect_summary(&self) -> ModbusConfigSummary
Returns a human-oriented summary for inspection surfaces.
Trait Implementations§
Source§impl Clone for ModbusSimulatorConfig
impl Clone for ModbusSimulatorConfig
Source§fn clone(&self) -> ModbusSimulatorConfig
fn clone(&self) -> ModbusSimulatorConfig
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 ModbusSimulatorConfig
impl Debug for ModbusSimulatorConfig
Source§impl Default for ModbusSimulatorConfig
impl Default for ModbusSimulatorConfig
Source§fn default() -> ModbusSimulatorConfig
fn default() -> ModbusSimulatorConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModbusSimulatorConfig
impl<'de> Deserialize<'de> for ModbusSimulatorConfig
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 ModbusSimulatorConfig
impl RefUnwindSafe for ModbusSimulatorConfig
impl Send for ModbusSimulatorConfig
impl Sync for ModbusSimulatorConfig
impl Unpin for ModbusSimulatorConfig
impl UnsafeUnpin for ModbusSimulatorConfig
impl UnwindSafe for ModbusSimulatorConfig
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