ruest/di/scope.rs
1/// Lifetime scope for a registered provider.
2#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
3pub enum Scope {
4 /// One instance for the entire application.
5 #[default]
6 Singleton,
7 /// A new instance on every resolution.
8 Transient,
9 /// One instance per HTTP request (stored in request extensions).
10 Request,
11}