pub struct ProductionConfig {
pub connection: ConnectionConfig,
pub performance: PerformanceConfig,
pub monitoring: MonitoringConfig,
pub security: SecurityConfig,
pub logging: LoggingConfig,
pub plc_settings: HashMap<String, PlcSpecificConfig>,
}Expand description
Production configuration for EtherNet/IP library
Fields§
§connection: ConnectionConfigConnection settings
performance: PerformanceConfigPerformance settings
monitoring: MonitoringConfigMonitoring settings
security: SecurityConfigSecurity settings
logging: LoggingConfigLogging settings
plc_settings: HashMap<String, PlcSpecificConfig>PLC-specific settings
Implementations§
Source§impl ProductionConfig
impl ProductionConfig
Sourcepub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, Box<dyn Error>>
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, Box<dyn Error>>
Load configuration from file
Sourcepub fn to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), Box<dyn Error>>
pub fn to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), Box<dyn Error>>
Save configuration to file
Sourcepub fn get_plc_config(&self, plc_address: &str) -> Option<&PlcSpecificConfig>
pub fn get_plc_config(&self, plc_address: &str) -> Option<&PlcSpecificConfig>
Get PLC-specific configuration
Sourcepub fn set_plc_config(&mut self, plc_address: String, config: PlcSpecificConfig)
pub fn set_plc_config(&mut self, plc_address: String, config: PlcSpecificConfig)
Add or update PLC-specific configuration
Sourcepub fn development() -> Self
pub fn development() -> Self
Create a development configuration
Sourcepub fn production() -> Self
pub fn production() -> Self
Create a production configuration
Trait Implementations§
Source§impl Clone for ProductionConfig
impl Clone for ProductionConfig
Source§fn clone(&self) -> ProductionConfig
fn clone(&self) -> ProductionConfig
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 ProductionConfig
impl Debug for ProductionConfig
Source§impl Default for ProductionConfig
impl Default for ProductionConfig
Source§impl<'de> Deserialize<'de> for ProductionConfig
impl<'de> Deserialize<'de> for ProductionConfig
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 ProductionConfig
impl RefUnwindSafe for ProductionConfig
impl Send for ProductionConfig
impl Sync for ProductionConfig
impl Unpin for ProductionConfig
impl UnwindSafe for ProductionConfig
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