pub enum ProviderLifetime {
Singleton,
Transient,
Request,
}Expand description
Provider creation and reuse strategy.
Variants§
Singleton
Create once and reuse for all resolutions.
Transient
Create a fresh value on every resolution.
Request
Create per request when request scopes are enabled.
Trait Implementations§
Source§impl Clone for ProviderLifetime
impl Clone for ProviderLifetime
Source§fn clone(&self) -> ProviderLifetime
fn clone(&self) -> ProviderLifetime
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ProviderLifetime
Source§impl Debug for ProviderLifetime
impl Debug for ProviderLifetime
impl Eq for ProviderLifetime
Source§impl PartialEq for ProviderLifetime
impl PartialEq for ProviderLifetime
Source§fn eq(&self, other: &ProviderLifetime) -> bool
fn eq(&self, other: &ProviderLifetime) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ProviderLifetime
Auto Trait Implementations§
impl Freeze for ProviderLifetime
impl RefUnwindSafe for ProviderLifetime
impl Send for ProviderLifetime
impl Sync for ProviderLifetime
impl Unpin for ProviderLifetime
impl UnsafeUnpin for ProviderLifetime
impl UnwindSafe for ProviderLifetime
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