pub struct Environment { /* private fields */ }Expand description
The deployment a panel runs in, such as staging: every page of the panel, its sign-in pages included, carries a stripe and a badge in its color, and its browser tab title starts with its name.
let panel = Panel::new("admin");
let panel = match std::env::var("APP_ENV").as_deref() {
Ok("production") => panel,
Ok(name) => panel.environment(Environment::new(name.to_owned()).color(Color::Info)),
Err(_) => panel.environment(Environment::new("Local")),
};Implementations§
Trait Implementations§
Source§impl Clone for Environment
impl Clone for Environment
Auto Trait Implementations§
impl Forget for Environment
impl Freeze for Environment
impl RefUnwindSafe for Environment
impl Send for Environment
impl Sync for Environment
impl Unpin for Environment
impl UnsafeUnpin for Environment
impl UnwindSafe for Environment
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