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

pub struct AtomicThunk<'a, T: 'a> { /* 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<'a, T: Send + 'a> Send for AtomicThunk<'a, T>
[src]

impl<'a, T: Sync + 'a> Sync for AtomicThunk<'a, T>
[src]

impl<'a, T: 'a> Drop for AtomicThunk<'a, T>
[src]

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

impl<'a, T: 'a> AsRef<T> for AtomicThunk<'a, T>
[src]

Performs the conversion.

impl<'a, T: 'a> AsMut<T> for AtomicThunk<'a, T>
[src]

Performs the conversion.

impl<'a, T: 'a> Deref for AtomicThunk<'a, T>
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<'a, T: 'a> DerefMut for AtomicThunk<'a, T>
[src]

The method called to mutably dereference a value

impl<'a, T: 'a> From<T> for AtomicThunk<'a, T>
[src]

Performs the conversion.

impl<'a, T: 'a> LazyRef<'a> for AtomicThunk<'a, 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.

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

impl<'a, T: 'a> LazyMut<'a> for AtomicThunk<'a, T>
[src]

impl<'a, T: 'a> Lazy<'a> for AtomicThunk<'a, T>
[src]

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