Lifetimes
Transient
Transients are constructed every time when requested. For transients, the following container types are supported:
T: No container.Box<T>: A boxed type, whereTcan be adyn T.
Singleton
Singletons are lazily constructed on the first access, and only a single instance can be created over the programs lifetime. When requested, a reference to the object is returned. The following container types are supported:
Rc<T>: Whenmultithreadandtokiofeature are disabled.Arc<T>: When themultithreadortokiois enabled.
The library offers a Ref type alias, which is aliasing the correct
container, based on the enabled features.
The next step is to understand registration.