di/description/lifetime.rs
1/// Represents the possible service lifetimes.
2#[derive(Copy, Clone, Debug, PartialEq)]
3pub enum ServiceLifetime {
4 /// Indicates that a single instance of the service will be created.
5 Singleton,
6
7 /// Indicates that a new instance of the service will be created for each scope.
8 Scoped,
9
10 /// Indicates that a new instance of the service will be created every time it is requested.
11 Transient,
12}