Enum adapton::reflect::trace::Effect [] [src]

pub enum Effect {
    Alloc(AllocCaseAllocKind),
    Force(ForceCase),
    Dirty,
    CleanRec,
    CleanEdge,
    CleanEval,
    Remove,
}

The effects of the DCG (including cleaning and dirtying) on one of its edges.

Variants

Wrapper for Effect::Alloc; transition to DCG after the alloc.

Wrapper for Effect::Force; transition to DCG after the force.

Transition to this edge as dirty (potentially inconsistent). This transition may consist of marking other edges dirty. The DCG's invariant about dirty edges is simple: If an edge is dirty, then all edges that force (demand/observe) the source of that edge must also be dirty. This transitive closure property ensures that we do not accidentally reuse stale cached values by mistake (a dirty edge will always witness a potentially stale cached value).

Clean this edge, marking it not dirty, or equivalently, definitely consistent. Cleaning an edge consists of processing the edge's dirty transitive dependencies, if any. Recursively, this processing may consist of marking other edges clean (CleanEdge), and/or, removing edges (Remove) and replacing them via reevaluation under the current DCG state (CleanEval).

This process finishes in one of two mutually-exclusive situations: Either the edge is cleaned, meaning that its target need not be recomputed (CleanEdge). Or else, the value on this edge has changed, and this means that the edge's source is potentially affected by the change. Consequently, this change requires that the edge source be reevaluated (CleanEval).

Transition to this edge as clean (definitely consistent), after doing a recursive cleaning of its dependencies and finding that they are clean. This effect is mutually-exclusive with CleanEval, which occurs when CleanEdge cannot occur on an edge that is being recursively cleaned (via CleanRec).

Re-evaluate the previously-forced thunk that is the target of this edge, to clean it. This effect is mutually-exclusive with CleanEdge. It occurs when CleanEdge cannot occur.

Transition to the DCG without this edge. Perhaps it will be replaced via re-execution, sometime later.

Trait Implementations

impl Clone for Effect
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Effect
[src]

Formats the value using the given formatter.