pub struct Source { /* private fields */ }Expand description
Read-only configuration source backed by a crate::Client.
collect returns the current snapshot. If the client has not loaded yet,
it performs an HTTP pull (with cache fallback). It never starts the
WebSocket session.
Trait Implementations§
Source§impl AsyncSource for Source
impl AsyncSource for Source
Source§fn collect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Map<String, Value>, ConfigError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn collect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Map<String, Value>, ConfigError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Collects all configuration properties available from this source and return
a Map as an async operations.
Source§fn collect_to<'life0, 'life1, 'async_trait>(
&'life0 self,
cache: &'life1 mut Value,
) -> Pin<Box<dyn Future<Output = Result<(), ConfigError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn collect_to<'life0, 'life1, 'async_trait>(
&'life0 self,
cache: &'life1 mut Value,
) -> Pin<Box<dyn Future<Output = Result<(), ConfigError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Collects all configuration properties to a provided cache.
Auto Trait Implementations§
impl !RefUnwindSafe for Source
impl !UnwindSafe for Source
impl Freeze for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnsafeUnpin for Source
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