pub enum Environment {
Development,
Staging,
Production,
}Variants§
Implementations§
Source§impl Environment
impl Environment
Sourcepub const fn is_development(&self) -> bool
pub const fn is_development(&self) -> bool
Returns true if the enum is Environment::Development otherwise false
Sourcepub const fn is_staging(&self) -> bool
pub const fn is_staging(&self) -> bool
Returns true if the enum is Environment::Staging otherwise false
Sourcepub const fn is_production(&self) -> bool
pub const fn is_production(&self) -> bool
Returns true if the enum is Environment::Production otherwise false
Source§impl Environment
impl Environment
Sourcepub const fn development() -> Self
pub const fn development() -> Self
returns a new instance of Development variant
Sourcepub const fn production() -> Self
pub const fn production() -> Self
returns a new instance of Production variant
pub fn from_env() -> Self
pub fn from_env_with_varname(var: &str) -> Self
Trait Implementations§
Source§impl AsRef<str> for Environment
impl AsRef<str> for Environment
Source§impl Clone for Environment
impl Clone for Environment
Source§fn clone(&self) -> Environment
fn clone(&self) -> Environment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Environment
impl Debug for Environment
Source§impl Default for Environment
impl Default for Environment
Source§fn default() -> Environment
fn default() -> Environment
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Environment
impl<'de> Deserialize<'de> for Environment
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
Source§impl Display for Environment
impl Display for Environment
Source§impl FromStr for Environment
impl FromStr for Environment
Source§impl Hash for Environment
impl Hash for Environment
Source§impl IntoEnumIterator for Environment
impl IntoEnumIterator for Environment
type Iterator = EnvironmentIter
fn iter() -> EnvironmentIter ⓘ
Source§impl Ord for Environment
impl Ord for Environment
Source§fn cmp(&self, other: &Environment) -> Ordering
fn cmp(&self, other: &Environment) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Environment
impl PartialEq for Environment
Source§impl PartialOrd for Environment
impl PartialOrd for Environment
Source§impl Serialize for Environment
impl Serialize for Environment
Source§impl TryFrom<&str> for Environment
impl TryFrom<&str> for Environment
Source§impl ValueEnum for Environment
impl ValueEnum for Environment
Source§impl VariantArray for Environment
impl VariantArray for Environment
Source§impl VariantNames for Environment
impl VariantNames for Environment
impl Copy for Environment
impl Eq for Environment
impl StructuralPartialEq for Environment
Auto Trait Implementations§
impl Freeze for Environment
impl RefUnwindSafe for Environment
impl Send for Environment
impl Sync for Environment
impl Unpin 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