Module canrun::state[][src]

Expand description

Track value bindings and constraints during the evaluation process.

State is the imperative core of each logic program. It manages the updates to the relationships between values while delegating the actual storage to a type specific Domain.

In general, it is preferred to deal with State indirectly through goals. They are essentially equivalent in capability, and their declarative, higher level nature makes them much easier to use. Goal functions typically provide automatic value wrapping through IntoVal.

An open State is the initial struct that you will start with (explicitly or implicitly through a goal). Iterating through the potential results will yield zero or more ResolvedStates.

Modules

Run code when variables are resolved.

Structs

Derived from an open State, depending on the constraints that have been applied.

The core struct used to contain and manage value bindings.

Traits

Fork a State into zero or more alternate states.

Iterate over ResolvedStates.

Type Definitions

An Iterator of ResolvedStates.

Type alias for an Iterator of States