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> 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> Lazy for AtomicThunk<T>
[src]

Defer a computation stored as a FnOnce closure. Unwrapping/dereferencing will force the computation of the closure. Read more

Manually force a thunk's computation.

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

Construct a thunk with a precomputed value. This means unwrapping/dereferencing is effectively a no-op. Read more