Struct sodium_rust::Lazy
source · pub struct Lazy<A> { /* private fields */ }
Expand description
A representation for a value that may not be available until the current transaction is closed.
Implementations§
source§impl<A: Send + Clone + 'static> Lazy<A>
impl<A: Send + Clone + 'static> Lazy<A>
sourcepub fn new<THUNK: FnMut() -> A + Send + 'static>(thunk: THUNK) -> Lazy<A>
pub fn new<THUNK: FnMut() -> A + Send + 'static>(thunk: THUNK) -> Lazy<A>
Create a new Lazy
whose value will be computed with the
given function sometime after the end of the current
transaction.