Struct thunk::strict::Strict
[−]
[src]
pub struct Strict<T>(_);
A do-nothing, strict "thunk". This is intended for implementing structures which are generic over strictness.
Trait Implementations
impl<T: Clone> Clone for Strict<T>
[src]
fn clone(&self) -> Strict<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: Copy> Copy for Strict<T>
[src]
impl<T> From<T> for Strict<T>
[src]
impl<T> AsRef<T> for Strict<T>
[src]
fn as_ref(&self) -> &T
Performs the conversion.
impl<T> AsMut<T> for Strict<T>
[src]
fn as_mut(&mut self) -> &mut T
Performs the conversion.
impl<T> Deref for Strict<T>
[src]
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &T
The method called to dereference a value
impl<T> DerefMut for Strict<T>
[src]
fn deref_mut(&mut self) -> &mut T
The method called to mutably dereference a value
impl<T> LazyRef for Strict<T>
[src]
fn defer<'a, F: FnOnce() -> T + 'a>(f: F) -> Strict<T>
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
fn force(&self)
Manually force a thunk's computation.
fn computed(t: Self::Target) -> Self
Construct a thunk with a precomputed value. This means forcing the thunk is a no-op. Read more
impl<T> LazyMut for Strict<T>
[src]
impl<T> Lazy for Strict<T>
[src]
fn unwrap(self) -> T
Unwrap a thunk into its inner value. This forces the thunk.