Struct thunk::sync::AtomicThunk [] [src]

pub struct AtomicThunk<T> { /* fields omitted */ }

A thread-safe AtomicThunk, representing a lazily computed value.

TODO: Test Option<UnsafeCell<Cache<T>>> instead of storing thunk invalidation in the atomic flag.

Trait Implementations

impl<T: Send> Send for AtomicThunk<T>
[src]

impl<T: Sync> Sync for AtomicThunk<T>
[src]

impl<T> Drop for AtomicThunk<T>
[src]

A method called when the value goes out of scope. Read more

impl<T> Borrow<T> for AtomicThunk<T>
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for AtomicThunk<T>
[src]

Mutably borrows from an owned value. Read more

impl<T> AsRef<T> for AtomicThunk<T>
[src]

Performs the conversion.

impl<T> AsMut<T> for AtomicThunk<T>
[src]

Performs the conversion.

impl<T> Deref for AtomicThunk<T>
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<T> DerefMut for AtomicThunk<T>
[src]

The method called to mutably dereference a value

impl<T> From<T> for AtomicThunk<T>
[src]

Performs the conversion.

impl<T> LazyRef for AtomicThunk<T>
[src]

Defer a computation stored as a FnOnce closure. Unwrapping/dereferencing will force the computation of the closure. The supplied closure must live as long as the type which the thunk computes. Read more

Manually force a thunk's computation.

Construct a thunk with a precomputed value. This means forcing the thunk is a no-op. Read more

impl<T> LazyMut for AtomicThunk<T>
[src]

impl<T> Lazy for AtomicThunk<T>
[src]

Unwrap a thunk into its inner value. This forces the thunk.