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