pub struct AppConfig { /* private fields */ }Expand description
Validated application settings loaded once during process startup.
Implementations§
Source§impl AppConfig
impl AppConfig
Sourcepub fn load() -> Result<AppConfig, ConfigError>
pub fn load() -> Result<AppConfig, ConfigError>
Load the conventional optional .env and process environment.
§Errors
Returns an error for malformed files, invalid values, or missing production requirements.
pub fn builder() -> AppConfigBuilder
Source§impl AppConfig
impl AppConfig
pub const fn environment(&self) -> Environment
pub fn address(&self) -> &str
pub fn public_url(&self) -> &str
pub fn database_url(&self) -> &str
pub fn vite_dev_url(&self) -> Option<&str>
pub fn trusted_proxies(&self) -> &[IpAddr]
pub fn allowed_hosts(&self) -> &[String]
pub const fn rate_limit_requests(&self) -> u64
pub const fn rate_limit_window(&self) -> Duration
pub fn secret(&self, key: &str) -> Option<&SecretValue>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnsafeUnpin 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