pub struct MultiConfig { /* private fields */ }

Implementations

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

Returns the value associated with the given key.

Similar to get but panics if there is no value.

Get the value as a string or panics if one isn’t found.

Get the value as an integer or panics if one isn’t found or cannot be parsed. Read more

Get the value as a float or panics if one isn’t found or cannot be parsed. Read more

Get the value as a bool or panics if one isn’t found or cannot be parsed. The following case-insensitive values are considered true: t, true, 1, y, yes. All other values are considered false. Read more

Get the value as a duration or panics if one isn’t found or can’t be parsed. Thre doesn’t appear to be a parsing function for a duration, so it attempts to convert to an integer and use that as the number of seconds. Read more

Get the value as a duration or panics if one isn’t found or it can’t be parsed. It uses RFC339 to parse it. Read more

Get a list or panics if one isn’t found. The list should be a comma-delimited list surrouned by brackets (e.g. [1, 2, 3] => vec![“1”, “2”, “3”]. Read more

Get a map or panics if one isn’t found. The list should be a comma-delimited list surrouned by braces with key/value pairs associated with => (e.g. {a=>1, b=>2, c=>3} => ((a,1), (b,2), (c,3))). Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.