pub struct SyncLazy<T: Send + Sync + 'static> { /* private fields */ }Expand description
A synchronous lazy-init wrapper using std::sync::OnceLock.
Useful for subsystems that can be initialized without async.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for SyncLazy<T>
impl<T> RefUnwindSafe for SyncLazy<T>where
T: RefUnwindSafe + UnwindSafe,
impl<T> Send for SyncLazy<T>
impl<T> Sync for SyncLazy<T>
impl<T> Unpin for SyncLazy<T>where
T: Unpin,
impl<T> UnsafeUnpin for SyncLazy<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for SyncLazy<T>where
T: UnwindSafe,
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