Trait Provider

Source
pub trait Provider:
    Send
    + Sync
    + 'static {
    type Ref: Resolvable;

    // Required method
    fn provide<'life0, 'life1, 'async_trait>(
        &'life0 self,
        resolver: &'life1 ResolverRef,
    ) -> Pin<Box<dyn Future<Output = ProvideResult<Self::Ref>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Associated Types§

Required Methods§

Source

fn provide<'life0, 'life1, 'async_trait>( &'life0 self, resolver: &'life1 ResolverRef, ) -> Pin<Box<dyn Future<Output = ProvideResult<Self::Ref>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§

Source§

impl<T> Provider for StaticProvider<T>
where T: Resolvable,

Source§

type Ref = T