Expand description
Declarative relationships between values.
Goals
provide a high level interface for defining logic
programs. They are composable, with many higher level goals being made
up of lower level primitives. Since the typical way of using goals are
through simple functions, it is easy to build and reuse custom, first class
goal constructors.
While State
exposes a lower level API, in practice there really
shouldn’t be anything that can’t be expressed using goals.
Most structs that implement Goal
are constructed with one of the many
constructor functions and
macros. These high level methods provide automatic
Value
wrapping through Into<Value<T>>
and other niceties.
Re-exports
pub use project::*;
Modules
Goal
s that deal with resolved values.
Macros
- Create a goal that only succeeds if all sub-goals succeed.
- Create a goal that yields a state for every successful sub-goal.
Structs
- A
Goal
that only succeeds if all sub-goals succeed. - A
Goal
that yields a state for every successful sub-goal. - A
Goal
that always fails. - A
Not
goal that needs to keep evaluating the state as variables are resolved. - A
Goal
that always succeeds.
Enums
- A Goal that only succeeds if the sub-goal is proved to always fail.
Traits
- Types implementing
Goal
represent declarative, lazily applied state updates.