Trait miau::provider::AsyncProvider[][src]

pub trait AsyncProvider: Send + Sync {
#[must_use]    fn collect<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Configuration, ConfigurationError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn describe(&self) -> ConfigurationInfo; }

Represents asynchronous configuration source and its associated format.

Can be as an aggregator of the two or by itself to represent source in which distinction between source and format is blurry.

Required methods

#[must_use]fn collect<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<Configuration, ConfigurationError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Collects given source into Configuration. It uses async_trait which is required to implement AsyncSource.

fn describe(&self) -> ConfigurationInfo[src]

Describes this provider.

Loading content...

Implementors

impl<S, T> AsyncProvider for ProviderStruct<S, T> where
    S: AsyncSource + Send + Sync,
    T: Format + Send + Sync
[src]

Loading content...