pub struct AppConfig {
pub server: ServerConfig,
pub broker: BrokerConfig,
pub strategies: Vec<StrategyConfig>,
pub risk: RiskConfig,
pub database: DatabaseConfig,
pub logging: LoggingConfig,
}Expand description
Main application configuration
Fields§
§server: ServerConfigServer configuration
broker: BrokerConfigBroker configuration (Alpaca, etc.)
strategies: Vec<StrategyConfig>Strategy configurations
risk: RiskConfigRisk management configuration
database: DatabaseConfigDatabase configuration
logging: LoggingConfigLogging configuration
Implementations§
Source§impl AppConfig
impl AppConfig
Sourcepub fn from_toml_file(path: impl AsRef<Path>) -> Result<Self>
pub fn from_toml_file(path: impl AsRef<Path>) -> Result<Self>
Sourcepub fn from_json_file(path: impl AsRef<Path>) -> Result<Self>
pub fn from_json_file(path: impl AsRef<Path>) -> Result<Self>
Sourcepub fn default_test_config() -> Self
pub fn default_test_config() -> Self
Create a default configuration for testing
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppConfig
impl<'de> Deserialize<'de> for AppConfig
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
Source§impl<'v_a> ValidateArgs<'v_a> for AppConfig
impl<'v_a> ValidateArgs<'v_a> for AppConfig
Auto Trait Implementations§
impl Freeze for AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnwindSafe for AppConfig
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