CustomConfigSource

Trait CustomConfigSource 

Source
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§

Source

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>

Source§

fn clone(&self) -> Box<dyn CustomConfigSource>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Box<dyn CustomConfigSource>

Source§

fn fmt(&self, _f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§