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) -> Result<(), ConfigError>
pub fn validate(&self) -> Result<(), ConfigError>
Validates the application configuration for correctness
Sourcepub fn validate_config(&self) -> Result<(), ConfigError>
pub fn validate_config(&self) -> Result<(), ConfigError>
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<AppConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AppConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for AppConfig
impl Serialize for AppConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl<'v_a> ValidateArgs<'v_a> for AppConfig
impl<'v_a> ValidateArgs<'v_a> for AppConfig
type Args = ()
fn validate_with_args( &self, args: <AppConfig as ValidateArgs<'v_a>>::Args, ) -> Result<(), ValidationErrors>
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