pub struct Transient;Expand description
The default scope. Never caches instances, so that every dependency
resolution will result in a new instance. This scope is intended for
short-lived objects and will result in validation error if you attempt to
inject it into objects with long-lived scopes like Singleton. Instances
that can be safely held on to can use the Agnostic scope.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Transient
impl RefUnwindSafe for Transient
impl Send for Transient
impl Sync for Transient
impl Unpin for Transient
impl UnwindSafe for Transient
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