pub struct Thunk {
pub cell: Mutex<ThunkState>,
}Expand description
A deferred computation. Forced once; result cached. Enables Nix-style
non-strict evaluation: (let ((x big-compute)) small) skips big-compute
unless something forces x.
Fields§
§cell: Mutex<ThunkState>Implementations§
Auto Trait Implementations§
impl !Freeze for Thunk
impl RefUnwindSafe for Thunk
impl Send for Thunk
impl Sync for Thunk
impl Unpin for Thunk
impl UnsafeUnpin for Thunk
impl UnwindSafe for Thunk
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