pub struct LazyFactory { /* private fields */ }Expand description
Lazy singleton factory - creates instance on first access
Optimization: Stores type-erased factory and instance to avoid generic monomorphization overhead in hot paths.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LazyFactory
impl !RefUnwindSafe for LazyFactory
impl Send for LazyFactory
impl Sync for LazyFactory
impl Unpin for LazyFactory
impl UnsafeUnpin for LazyFactory
impl !UnwindSafe for LazyFactory
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
Source§impl<T> Injectable for T
impl<T> Injectable for T
Source§fn type_id_of() -> TypeIdwhere
Self: Sized,
fn type_id_of() -> TypeIdwhere
Self: Sized,
Returns the TypeId of this type (for internal use)
Source§fn type_name_of() -> &'static strwhere
Self: Sized,
fn type_name_of() -> &'static strwhere
Self: Sized,
Returns the type name for debugging