pub enum ComponentScope {
Singleton,
Prototype,
}Expand description
Enumeration of component lifecycle scopes
This enum defines how component instances are managed by the container.
§Variants
Singleton- Only one instance of the component exists throughout the application lifecyclePrototype- A new instance is created each time the component is requested
Variants§
Singleton
Single shared instance across the entire application
Prototype
New instance created on each request
Trait Implementations§
Source§impl Clone for ComponentScope
impl Clone for ComponentScope
Source§fn clone(&self) -> ComponentScope
fn clone(&self) -> ComponentScope
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 ComponentScope
impl Debug for ComponentScope
Source§impl PartialEq for ComponentScope
impl PartialEq for ComponentScope
impl Copy for ComponentScope
impl Eq for ComponentScope
impl StructuralPartialEq for ComponentScope
Auto Trait Implementations§
impl Freeze for ComponentScope
impl RefUnwindSafe for ComponentScope
impl Send for ComponentScope
impl Sync for ComponentScope
impl Unpin for ComponentScope
impl UnsafeUnpin for ComponentScope
impl UnwindSafe for ComponentScope
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