pub struct DbLoader<L: ConfigLoader>(pub L);Expand description
A Loader that delegates to a ConfigLoader implementation.
Wraps any ConfigLoader and adapts it to the Loader trait,
routing identifiers by URL scheme and returning parsed configuration
data.
Tuple Fields§
§0: LImplementations§
Trait Implementations§
Source§impl<L: ConfigLoader> Loader for DbLoader<L>
impl<L: ConfigLoader> Loader for DbLoader<L>
Source§fn provides(&self, identifier: &str) -> bool
fn provides(&self, identifier: &str) -> bool
Whether this loader can handle the given identifier. Read more
Source§fn load<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
identifier: &'life1 str,
formatters: &'life2 [&'life3 dyn Formatter],
) -> Pin<Box<dyn Future<Output = Result<LoadResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn load<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
identifier: &'life1 str,
formatters: &'life2 [&'life3 dyn Formatter],
) -> Pin<Box<dyn Future<Output = Result<LoadResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Load and parse configuration from the identifier. Read more
Auto Trait Implementations§
impl<L> Forget for DbLoader<L>
impl<L> Freeze for DbLoader<L>where
L: Freeze,
impl<L> RefUnwindSafe for DbLoader<L>where
L: RefUnwindSafe,
impl<L> Send for DbLoader<L>
impl<L> Sync for DbLoader<L>
impl<L> Unpin for DbLoader<L>where
L: Unpin,
impl<L> UnsafeUnpin for DbLoader<L>where
L: UnsafeUnpin,
impl<L> UnwindSafe for DbLoader<L>where
L: UnwindSafe,
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