pub trait AsyncDIPortal {
// Required method
fn create_for_di<'life0, 'async_trait>(
container: &'life0 DIContainer,
) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn di_on<'life0, 'async_trait>(
container: &'life0 DIContainer,
) -> Pin<Box<dyn Future<Output = DI<Self>> + Send + 'async_trait>>
where Self: Sized + DITarget + Send + 'async_trait,
'life0: 'async_trait { ... }
fn di<'async_trait>( ) -> Pin<Box<dyn Future<Output = DI<Self>> + Send + 'async_trait>>
where Self: Sized + DITarget + Send + 'async_trait { ... }
}Expand description
Add di methods for DI target types that needs async creation.
Required Methods§
Sourcefn create_for_di<'life0, 'async_trait>(
container: &'life0 DIContainer,
) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_for_di<'life0, 'async_trait>(
container: &'life0 DIContainer,
) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create new instance for DI.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.