pub struct ConfigurationSources { /* private fields */ }
Expand description

A description of where to find our configuration options.

Implementations

Create a new empty ConfigurationSources.

Establish a ConfigurationSources the usual way from a command line and defaults

The caller should have parsed the program’s command line, and extracted (inter alia)

  • config_files_options: Paths of config file(s)
  • cmdline_toml_override_options: Overrides (“key=value”)

The caller should also provide default_config_file, the default location of the configuration file. This is used if no file(s) are specified on the command line.

mistrust is used to check whether the configuration files have appropriate permissions.

Add p to the list of files that we want to read configuration from.

Configuration files are loaded and applied in the order that they are added to this object.

If the listed file is absent, loading the configuration won’t succeed.

As push_file, but if the listed file can’t be loaded, loading the configuration can still succeed.

Add s to the list of overridden options to apply to our configuration.

Options are applied after all configuration files are loaded, in the order that they are added to this object.

The format for s is as in CmdLine.

Sets the filesystem permission mistrust

Reads the filesystem permission mistrust

Return an iterator over the files that we care about.

Load the configuration into a new config::Config.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. 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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more