Provider

Trait Provider 

Source
pub trait Provider<T: Named + Clone + Send + Sync>: Send + Sync {
    // Required methods
    fn provider_name(&self) -> &str;
    fn list<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<T>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn load_all<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn priority(&self) -> i32 { ... }
    fn source_type(&self) -> SourceType { ... }
}

Required Methods§

Source

fn provider_name(&self) -> &str

Source

fn list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<T>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn load_all<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Implementors§

Source§

impl<T, L, S> Provider<T> for FileProvider<T, L, S>
where T: Named + Clone + Send + Sync + 'static, L: DocumentLoader<T> + 'static, S: LookupStrategy + 'static,

Source§

impl<T: Named + Clone + Send + Sync + 'static> Provider<T> for ChainProvider<T>

Source§

impl<T: Named + Clone + Send + Sync + 'static> Provider<T> for InMemoryProvider<T>