pub struct SaolaConfig {
pub primary_host: String,
pub default_locale: String,
pub fallback_locale: String,
}Fields§
§primary_host: String§default_locale: String§fallback_locale: StringImplementations§
Source§impl SaolaConfig
impl SaolaConfig
Sourcepub fn from_env(env: &Env) -> Self
pub fn from_env(env: &Env) -> Self
Read the section from the environment, starting from its defaults.
| Field | Variable | Default |
|---|---|---|
primary_host | SAOLA_PRIMARY_HOST | `` |
default_locale | SAOLA_DEFAULT_LOCALE | vi |
fallback_locale | SAOLA_FALLBACK_LOCALE | en |
from_env records invalid values and missing required values in env. Those problems
stop the application from starting.
Trait Implementations§
Source§impl Clone for SaolaConfig
impl Clone for SaolaConfig
Source§impl Debug for SaolaConfig
impl Debug for SaolaConfig
Auto Trait Implementations§
impl Forget for SaolaConfig
impl Freeze for SaolaConfig
impl Move for SaolaConfig
impl RefUnwindSafe for SaolaConfig
impl Send for SaolaConfigwhere
RawVecInner: Send,
impl Sync for SaolaConfigwhere
RawVecInner: Sync,
impl Unpin for SaolaConfig
impl UnsafeUnpin for SaolaConfig
impl UnwindSafe for SaolaConfigwhere
RawVecInner: UnwindSafe,
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