pub trait ControllerFactory: Send + Sync {
// Required method
fn create_controller<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
container: &'life1 IocContainer,
scope: Option<&'life2 ScopeId>,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ElifController>, HttpError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}
Expand description
Trait for creating controller instances from the IoC container
Required Methods§
Sourcefn create_controller<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
container: &'life1 IocContainer,
scope: Option<&'life2 ScopeId>,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ElifController>, HttpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create_controller<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
container: &'life1 IocContainer,
scope: Option<&'life2 ScopeId>,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ElifController>, HttpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create a controller instance with dependencies resolved from the container