pub struct Settings {
pub database_url: Option<String>,
pub redis_url: Option<String>,
pub dashboard_port: u16,
pub dashboard_host: String,
pub max_workers: u32,
pub max_connections: u32,
pub log_level: String,
pub auto_migrate: bool,
pub require_ssl: bool,
}
Expand description
Application settings loaded from environment variables
Fields§
§database_url: Option<String>
PostgreSQL database URL
redis_url: Option<String>
Redis URL
dashboard_port: u16
Dashboard server port
dashboard_host: String
Dashboard server host
max_workers: u32
Maximum number of workers
max_connections: u32
Maximum database connections
log_level: String
Log level
auto_migrate: bool
Auto migrate flag
require_ssl: bool
Require SSL flag
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Settings
impl<'de> Deserialize<'de> for Settings
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 Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
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