Struct calc_graph::Lazy[][src]

pub struct Lazy<T, F>(_);

Calculates a node's value by calling a function on demand and caching the result.

Trait Implementations

impl<T: Clone, F: FnOnce() -> T> Calc for Lazy<T, F>
[src]

The type of values calculated by the node.

When this node is used as a precedent, add_dep is called by dependent nodes when they are created. Read more

Returns the value held within the node and the version number of the inputs used to calcuate that value. The value is recalculated if needed. Read more

Auto Trait Implementations

impl<T, F> Send for Lazy<T, F> where
    F: Send,
    T: Send

impl<T, F> Sync for Lazy<T, F> where
    F: Sync,
    T: Sync