single
inline fun <T : Any> single(qualifier: Qualifier = TypeQualifier(T::class), noinline create: () -> T)
Defines a singleton dependency that will have only one instance created and shared throughout the scope's lifecycle.
Parameters
T
The type of the dependency.
qualifier
An optional Qualifier to uniquely identify this dependency.
create
A lambda function that provides the single instance of the dependency.