pub trait AsyncInitWith<Deps>: Sized {
// Required method
fn init_with<'async_trait>(
deps: Deps,
) -> Pin<Box<dyn Future<Output = Result<Self, DependencyError>> + Send + 'async_trait>>
where Self: 'async_trait;
}Available on crate feature
di only.Expand description
Trait for types that can be initialized with dependencies
Required 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.