Struct config::Environment
source · [−]pub struct Environment { /* private fields */ }
Implementations
sourceimpl Environment
impl Environment
pub fn new() -> Self
👎 Deprecated since 0.12.0:
please use ‘Environment::default’ instead
pub fn with_prefix(s: &str) -> Self
pub fn prefix(self, s: &str) -> Self
pub fn separator(self, s: &str) -> Self
pub fn ignore_empty(self, ignore: bool) -> Self
sourcepub fn try_parsing(self, try_parsing: bool) -> Self
pub fn try_parsing(self, try_parsing: bool) -> Self
Note: enabling try_parsing
can reduce performance it will try and parse
each environment variable 3 times (bool, i64, f64)
pub fn source(self, source: Option<Map<String, String>>) -> Self
Trait Implementations
sourceimpl Clone for Environment
impl Clone for Environment
sourcefn clone(&self) -> Environment
fn clone(&self) -> Environment
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Environment
impl Debug for Environment
sourceimpl Default for Environment
impl Default for Environment
sourcefn default() -> Environment
fn default() -> Environment
Returns the “default value” for a type. Read more
sourceimpl Source for Environment
impl Source for Environment
fn clone_into_box(&self) -> Box<dyn Source + Send + Sync>
sourcefn collect(&self) -> Result<Map<String, Value>, ConfigError>
fn collect(&self) -> Result<Map<String, Value>, ConfigError>
Collect all configuration properties available from this source and return a Map. Read more
sourcefn collect_to(&self, cache: &mut Value) -> Result<(), ConfigError>
fn collect_to(&self, cache: &mut Value) -> Result<(), ConfigError>
Collects all configuration properties to a provided cache.
Auto Trait Implementations
impl RefUnwindSafe for Environment
impl Send for Environment
impl Sync for Environment
impl Unpin for Environment
impl UnwindSafe for Environment
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more