pub struct Builder(/* private fields */);Expand description
Represents a configuration builder.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn providers(&self) -> impl Iterator<Item = &dyn Provider>
pub fn providers(&self) -> impl Iterator<Item = &dyn Provider>
Gets the configuration providers.
Sourcepub fn build(&self) -> Result<Configuration>
pub fn build(&self) -> Result<Configuration>
Builds a configuration from the registered configuration providers.
Trait Implementations§
Source§impl ChainedExt for Builder
Available on crate feature chained only.
impl ChainedExt for Builder
Available on crate feature
chained only.Source§fn add_configuration<T: Into<Arc<Configuration>>>(
self,
configuration: T,
) -> Self
fn add_configuration<T: Into<Arc<Configuration>>>( self, configuration: T, ) -> Self
Adds an existing configuration. Read more
Source§impl CommandLineExt for Builder
Available on crate feature cmd only.
impl CommandLineExt for Builder
Available on crate feature
cmd only.Source§fn add_command_line(self) -> Self
fn add_command_line(self) -> Self
Adds a command line configuration source.
Source§impl EnvVarsExt for Builder
Available on crate feature env only.
impl EnvVarsExt for Builder
Available on crate feature
env only.Source§fn add_env_vars_with_prefix<S: Into<String>>(self, prefix: S) -> Self
fn add_env_vars_with_prefix<S: Into<String>>(self, prefix: S) -> Self
Adds environment variables as a configuration source. Read more
Source§fn add_env_vars(self) -> Self
fn add_env_vars(self) -> Self
Adds environment variables as a configuration source.
Source§impl IniExt for Builder
Available on crate feature ini only.
impl IniExt for Builder
Available on crate feature
ini only.Source§fn add_ini_file<F: Into<FileSource>>(self, file: F) -> Self
fn add_ini_file<F: Into<FileSource>>(self, file: F) -> Self
Adds an
*.ini file as a configuration source. Read moreSource§impl JsonExt for Builder
Available on crate feature json only.
impl JsonExt for Builder
Available on crate feature
json only.Source§fn add_json_file<F: Into<FileSource>>(self, file: F) -> Self
fn add_json_file<F: Into<FileSource>>(self, file: F) -> Self
Adds a
*.json file as a configuration source. Read moreSource§impl TryFrom<Builder> for Configuration
impl TryFrom<Builder> for Configuration
Source§impl TryFrom<Builder> for ReloadableConfiguration
impl TryFrom<Builder> for ReloadableConfiguration
Source§impl XmlExt for Builder
Available on crate feature xml only.
impl XmlExt for Builder
Available on crate feature
xml only.Source§fn add_xml_file<F: Into<FileSource>>(self, file: F) -> Self
fn add_xml_file<F: Into<FileSource>>(self, file: F) -> Self
Adds a
*.xml file as a configuration source. Read moreSource§impl YamlExt for Builder
Available on crate feature yaml only.
impl YamlExt for Builder
Available on crate feature
yaml only.Source§fn add_yaml_file<F: Into<FileSource>>(self, file: F) -> Self
fn add_yaml_file<F: Into<FileSource>>(self, file: F) -> Self
Adds a
*.yaml file as a configuration source. Read moreAuto Trait Implementations§
impl Freeze for Builder
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
impl !UnwindSafe for Builder
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