pub struct CompositeSource { /* private fields */ }
Expand description
A source that combines multiple configuration sources
Implementations§
Source§impl CompositeSource
impl CompositeSource
Sourcepub fn add_source(self, source: Box<dyn ConfigSource>, priority: u32) -> Self
pub fn add_source(self, source: Box<dyn ConfigSource>, priority: u32) -> Self
Add a source with priority (higher number = higher priority)
Trait Implementations§
Source§impl ConfigSource for CompositeSource
impl ConfigSource for CompositeSource
Source§fn load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConfigValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConfigValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load configuration from this source
Source§fn supports_watching(&self) -> bool
fn supports_watching(&self) -> bool
Check if this source supports watching for changes
Source§fn start_watching<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Receiver<ConfigValue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_watching<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Receiver<ConfigValue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start watching for changes (if supported)
Auto Trait Implementations§
impl Freeze for CompositeSource
impl !RefUnwindSafe for CompositeSource
impl Send for CompositeSource
impl Sync for CompositeSource
impl Unpin for CompositeSource
impl !UnwindSafe for CompositeSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more