ConfigProviderExt

Trait ConfigProviderExt 

Source
pub trait ConfigProviderExt: ConfigProvider {
    // Provided methods
    fn get<T: DeserializeOwned + Send>(
        &self,
        key: &str,
    ) -> impl Future<Output = ConfigResult<Option<T>>> + Send
       where Self: Sync { ... }
    fn set<T: Serialize + Send + Sync>(
        &self,
        key: &str,
        value: &T,
    ) -> impl Future<Output = ConfigResult<()>> + Send
       where Self: Sync { ... }
}
Expand description

Extension methods for typed configuration access

Provided Methods§

Source

fn get<T: DeserializeOwned + Send>( &self, key: &str, ) -> impl Future<Output = ConfigResult<Option<T>>> + Send
where Self: Sync,

Get a typed configuration value

Source

fn set<T: Serialize + Send + Sync>( &self, key: &str, value: &T, ) -> impl Future<Output = ConfigResult<()>> + Send
where Self: Sync,

Set a typed configuration value

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.

Implementors§