pub enum ServiceLifetime {
Singleton,
Scoped,
Transient,
}
Expand description
Represents the possible service lifetimes.
Variants§
Singleton
Indicates that a single instance of the service will be created.
Scoped
Indicates that a new instance of the service will be created for each scope.
Transient
Indicates that a new instance of the service will be created every time it is requested.
Trait Implementations§
Source§impl Clone for ServiceLifetime
impl Clone for ServiceLifetime
Source§fn clone(&self) -> ServiceLifetime
fn clone(&self) -> ServiceLifetime
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ServiceLifetime
impl Debug for ServiceLifetime
Source§impl PartialEq for ServiceLifetime
impl PartialEq for ServiceLifetime
impl Copy for ServiceLifetime
impl StructuralPartialEq for ServiceLifetime
Auto Trait Implementations§
impl Freeze for ServiceLifetime
impl RefUnwindSafe for ServiceLifetime
impl Send for ServiceLifetime
impl Sync for ServiceLifetime
impl Unpin for ServiceLifetime
impl UnwindSafe for ServiceLifetime
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more