BuildFromContextAsync

Trait BuildFromContextAsync 

Source
pub trait BuildFromContextAsync<E, CtxErr = (), InitErr = ()> {
    // Required method
    fn build_from<'life0, 'async_trait>(
        ctx: &'life0 AppContextBuilder,
        extras: E,
    ) -> Pin<Box<dyn Future<Output = Result<Self, CtxErr>> + Send + 'async_trait>>
       where Self: Sized + 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn init_self<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), InitErr>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

async implementation for building context

Required Methods§

Source

fn build_from<'life0, 'async_trait>( ctx: &'life0 AppContextBuilder, extras: E, ) -> Pin<Box<dyn Future<Output = Result<Self, CtxErr>> + Send + 'async_trait>>
where Self: Sized + 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

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

initialization method after all beans have been built. because of potential cyclic invocations during the initialization, only immutable references are allowed

Implementors§