Function di::singleton_with_key_factory
source · pub fn singleton_with_key_factory<TKey, TSvc: Any + ?Sized, F>(
factory: F
) -> ServiceDescriptorAvailable on crate feature
builder only.Expand description
Initializes a new keyed singleton ServiceDescriptor.
Arguments
factory- The factory method used to create the service