pub trait CustomConfigSource:
CustomConfigSourceClone
+ Send
+ Sync {
// Required method
fn get_config_value(&self) -> Result<Value, Error>;
}Expand description
Allows for providing a custom configuration source.
This trait can be implemented to define a custom configuration source. The trait
extends the CustomConfigSourceClone trait and requires the Self type to be
cloneable and support sending between threads (Send) and sharing between threads
(Sync).
Required Methods§
Sourcefn get_config_value(&self) -> Result<Value, Error>
fn get_config_value(&self) -> Result<Value, Error>
This is the only implementable member. Here you can return a serde value
Trait Implementations§
Source§impl Clone for Box<dyn CustomConfigSource>
impl Clone for Box<dyn CustomConfigSource>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".