Struct thunk::unsync::Thunk [] [src]

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

A non-thread-safe Thunk, representing a lazily computed value.

Trait Implementations

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

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

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

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

Performs the conversion.

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

Performs the conversion.

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

The resulting type after dereferencing

The method called to dereference a value

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

The method called to mutably dereference a value

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

Performs the conversion.

impl<T> LazyRef for Thunk<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 Thunk<T>
[src]

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

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