pub enum AppMode {
Development,
Production,
}Expand description
Controls how the framework behaves at startup and at runtime.
Variants§
Development
Full startup banner, per-request console logging, verbose diagnostics.
Production
Minimal one-line startup message, no framework-initiated console logging.
Implementations§
Source§impl AppMode
impl AppMode
Sourcepub fn overlay_filename(&self) -> &'static str
pub fn overlay_filename(&self) -> &'static str
环境模式对应的 overlay 文件名,如 appsettings.Development.json。
Sourcepub fn from_env() -> AppMode
pub fn from_env() -> AppMode
从环境变量 APP_ENV 解析运行模式;未设置或值非法时返回 Development。
接受(不区分大小写):Production / Prod / Development / Dev。
Sourcepub fn from_env_var(var: &str) -> AppMode
pub fn from_env_var(var: &str) -> AppMode
从指定环境变量名解析运行模式。
Trait Implementations§
impl Copy for AppMode
impl Eq for AppMode
impl StructuralPartialEq for AppMode
Auto Trait Implementations§
impl Freeze for AppMode
impl RefUnwindSafe for AppMode
impl Send for AppMode
impl Sync for AppMode
impl Unpin for AppMode
impl UnsafeUnpin for AppMode
impl UnwindSafe for AppMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.