pub struct MonitorConfig {
pub general: GeneralConfig,
pub storage: StorageConfig,
pub exchanges: ExchangesConfig,
pub monitoring: MonitoringConfig,
pub logging: LoggerConfig,
pub network: NetworkConfig,
pub development: DevelopmentConfig,
}Expand description
Main configuration structure for the monitor
Fields§
§general: GeneralConfigGeneral application configuration
storage: StorageConfigStorage and file management configuration
exchanges: ExchangesConfigExchange-specific configurations
monitoring: MonitoringConfigMonitoring and metrics configuration
logging: LoggerConfigLogging configuration
network: NetworkConfigNetwork configuration
development: DevelopmentConfigDevelopment and debugging configuration
Implementations§
Source§impl MonitorConfig
impl MonitorConfig
Sourcepub fn from_toml_str(content: &str) -> Result<Self>
pub fn from_toml_str(content: &str) -> Result<Self>
Load configuration from a TOML string
Sourcepub fn load_with_env() -> Result<Self>
pub fn load_with_env() -> Result<Self>
Load configuration with environment variable overrides
Sourcepub fn get_exchange_config(
&self,
exchange_name: &str,
) -> Option<&ExchangeConfig>
pub fn get_exchange_config( &self, exchange_name: &str, ) -> Option<&ExchangeConfig>
Get exchange configuration by name
Sourcepub fn get_enabled_exchanges(&self) -> Vec<String> ⓘ
pub fn get_enabled_exchanges(&self) -> Vec<String> ⓘ
Get a list of all enabled exchanges
Sourcepub fn create_directories(&self) -> Result<()>
pub fn create_directories(&self) -> Result<()>
Create base directories if they don’t exist
Trait Implementations§
Source§impl Clone for MonitorConfig
impl Clone for MonitorConfig
Source§fn clone(&self) -> MonitorConfig
fn clone(&self) -> MonitorConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MonitorConfig
impl Debug for MonitorConfig
Source§impl Default for MonitorConfig
impl Default for MonitorConfig
Source§impl<'de> Deserialize<'de> for MonitorConfig
impl<'de> Deserialize<'de> for MonitorConfig
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 MonitorConfig
impl RefUnwindSafe for MonitorConfig
impl Send for MonitorConfig
impl Sync for MonitorConfig
impl Unpin for MonitorConfig
impl UnwindSafe for MonitorConfig
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