pub trait ConfigurationBuilder: Sized {
type Config: Configuration;
// Required methods
fn push_provider<P: ConfigurationProvider + 'static>(
self,
source: P,
) -> Self;
fn build(self) -> Result<Self::Config>;
// Provided method
fn add<S: ConfigurationSource>(self, source: S) -> Result<Self> { ... }
}Expand description
A configuration builder.
Required Associated Types§
Sourcetype Config: Configuration
type Config: Configuration
Resulting configuration type.
Required Methods§
Sourcefn push_provider<P: ConfigurationProvider + 'static>(self, source: P) -> Self
fn push_provider<P: ConfigurationProvider + 'static>(self, source: P) -> Self
Add a configuration provider to the builder.
Provided Methods§
Sourcefn add<S: ConfigurationSource>(self, source: S) -> Result<Self>
fn add<S: ConfigurationSource>(self, source: S) -> Result<Self>
Add a configuration source to the builder.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.