pub struct LazyCell<T, F = fn() -> T> { /* private fields */ }
Expand description
A memory cell which is initialized on the first access
Implementations
Trait Implementations
impl<T, F: UnwindSafe> RefUnwindSafe for LazyCell<T, F> where
Cell<T>: RefUnwindSafe,
impl<T, F: Send> Sync for LazyCell<T, F> where
MaybeUninit<T>: Sync,
impl<T, F: UnwindSafe> UnwindSafe for LazyCell<T, F> where
Cell<T>: UnwindSafe,
Auto Trait Implementations
impl<T, F> LooseTxInUnsafe for LazyCell<T, F> where
F: LooseTxInUnsafe,
T: LooseTxInUnsafe,
impl<T, F = fn() -> T> !PSafe for LazyCell<T, F>
impl<T, F> PSend for LazyCell<T, F> where
F: PSend,
T: PSend,
impl<T, F> Send for LazyCell<T, F> where
F: Send,
T: Send,
impl<T, F = fn() -> T> !TxInSafe for LazyCell<T, F>
impl<T, F = fn() -> T> !TxOutSafe for LazyCell<T, F>
impl<T, F> Unpin for LazyCell<T, F> where
F: Unpin,
T: Unpin,
impl<T, F> VSafe for LazyCell<T, F> where
F: VSafe,
T: VSafe,
Blanket Implementations
sourceimpl<T, P> Allocatable<T, P> for T where
T: Default,
P: MemPool,
impl<T, P> Allocatable<T, P> for T where
T: Default,
P: MemPool,
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more