pub trait ConfigProviderExt: ConfigProvider {
// Provided method
fn get<T: DeserializeOwned>(
&self,
key: &str,
) -> Result<Option<T>, ConfigError> { ... }
}
Expand description
Extension trait for ConfigProvider that provides methods for typed access. This trait is not object-safe because it has generic methods.
Provided Methods§
Sourcefn get<T: DeserializeOwned>(&self, key: &str) -> Result<Option<T>, ConfigError>
fn get<T: DeserializeOwned>(&self, key: &str) -> Result<Option<T>, ConfigError>
Get a configuration value by key and deserialize it to the specified type.
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.