Struct rslogic::state::State [] [src]

pub struct State<T> where
    T: PartialEq + Unif<T>, 
{ /* fields omitted */ }

A logical state, containing a collection of variable bindings.

Variables are stored with one level of indirection, to indicate variables that have been unified before being bound.

Methods

impl<T> State<T> where
    T: PartialEq + Unif<T>, 
[src]

Creates an empty state.

Returns true if the variable is bound in the state.

Returns a reference to the value bound to the variable in the state, or None if the var4iable is not bound.

Attempts to unify a variable with a value. If the variable is not bound, returns a new state containing a binding to the value. If the variable is already bound, returns the unification of the two values.

Attempts to unify two variables.

Creates a new variable and a new state with which it is usable.

Trait Implementations

impl<T> Clone for State<T> where
    T: PartialEq + Unif<T>, 
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more