[][src]Module canrun::state

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

constraints

Run code when variables are resolved.

Structs

ResolvedState

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

State

The core struct used to contain and manage value bindings.

Traits

Fork

Fork a State into zero or more alternate states.

IterResolved

Iterate over ResolvedStates.

Type Definitions

ResolvedStateIter

An Iterator of ResolvedStates.

StateIter

Type alias for an Iterator of States