pub struct AppConfig {
pub port: u16,
pub environment: Environment,
pub log_level: LogLevel,
pub use_testnet: bool,
pub transaction: TransactionConfig,
pub retry: RetryConfig,
}Expand description
Application configuration
Fields§
§port: u16Server port
environment: EnvironmentApplication environment
log_level: LogLevelLog level
use_testnet: boolWhether to use testnet chains
transaction: TransactionConfigTransaction settings
retry: RetryConfigRetry configuration
Implementations§
Source§impl AppConfig
impl AppConfig
Sourcepub fn validate(&self) -> ConfigResult<()>
pub fn validate(&self) -> ConfigResult<()>
Validates the application configuration for correctness
Sourcepub fn validate_config(&self) -> ConfigResult<()>
pub fn validate_config(&self) -> ConfigResult<()>
Validates the application configuration
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