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

pub enum Effect {
    Debug(Option<Name>, Option<String>),
    Alloc(AllocCaseAllocKind),
    Force(ForceCase),
    Dirty,
    CleanRec,
    CleanEdge,
    CleanEval,
    Remove,
}

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

Variants

Debugging/visualization information: An ID (the optional name) and string.

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

Force(ForceCase)

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

Dirty

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).

CleanRec

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).

CleanEdge

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).

CleanEval

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.

Remove

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

Trait Implementations

impl Clone for Effect[src]

impl Debug for Effect[src]

Auto Trait Implementations

impl !RefUnwindSafe for Effect

impl !Send for Effect

impl !Sync for Effect

impl Unpin for Effect

impl !UnwindSafe for Effect

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.