pub struct LazyService<T> { /* private fields */ }Expand description
Lazy initialization wrapper for expensive singleton services
Defers service creation until first access, improving startup performance.
Implementations§
Source§impl<T> LazyService<T>
impl<T> LazyService<T>
Sourcepub fn is_initialized(&self) -> bool
pub fn is_initialized(&self) -> bool
Check if the service has been initialized
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for LazyService<T>
impl<T> !RefUnwindSafe for LazyService<T>
impl<T> !UnwindSafe for LazyService<T>
impl<T> Send for LazyService<T>
impl<T> Sync for LazyService<T>
impl<T> Unpin for LazyService<T>
impl<T> UnsafeUnpin for LazyService<T>
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