Enum di::ServiceLifetime
source · 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 copy 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
source§fn eq(&self, other: &ServiceLifetime) -> bool
fn eq(&self, other: &ServiceLifetime) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ServiceLifetime
impl StructuralPartialEq for ServiceLifetime
Auto Trait Implementations§
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