pub type ServiceFactory = Box<dyn Fn(ServiceProviderContext) -> Pin<Box<dyn Future<Output = Result<Box<dyn Any + Send + Sync>, Box<dyn Error>>> + Send>> + Send + Sync>;Expand description
A factory function that creates service instances.
The factory receives a ServiceProviderContext and returns a pinned future
that resolves to a boxed service instance or an error.
Aliased Typeยง
pub struct ServiceFactory(/* private fields */);