Struct dinglebit_config::multi::MultiConfig [−][src]
pub struct MultiConfig { /* fields omitted */ }
Implementations
impl MultiConfig
[src]
Create a configuration that uses the given list of configs to
try and get values. If a value isn’t found, the next config on
the list is consulted. This allows your to create a set of
configs that can override values as needed. For example,
creating a MultiConfig
with !vec[environment, instance-config-file, global-config-file, default-values]
would provide something like you’d expect in a 12-factor app.
Trait Implementations
impl Config for MultiConfig
[src]
fn get(&self, key: &str) -> Option<String>
[src]
fn must_get(&self, key: &str) -> String
[src]
fn string(&self, key: &str) -> String
[src]
fn int(&self, key: &str) -> i64
[src]
fn float(&self, key: &str) -> f64
[src]
fn bool(&self, key: &str) -> bool
[src]
fn duration(&self, key: &str) -> Duration
[src]
fn datetime(&self, key: &str) -> DateTime<Utc>
[src]
fn list(&self, key: &str) -> Vec<String>
[src]
fn map(&self, key: &str) -> HashMap<String, String>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for MultiConfig
impl !Send for MultiConfig
impl !Sync for MultiConfig
impl Unpin for MultiConfig
impl !UnwindSafe for MultiConfig
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,