AsyncInit

Trait AsyncInit 

Source
pub trait AsyncInit: Sized {
    // Required method
    fn init<'async_trait>(    ) -> 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 async initialization

Required Methods§

Source

fn init<'async_trait>() -> Pin<Box<dyn Future<Output = Result<Self, DependencyError>> + Send + 'async_trait>>
where Self: 'async_trait,

Initialize the type asynchronously

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.

Implementors§