Struct canrun::state::ResolvedState [−][src]
pub struct ResolvedState<D> { /* fields omitted */ }
Expand description
Derived from an open State
, depending on
the constraints that have been applied.
Calling .iter_resolved()
is the
lowest level way to get an iterator of the possible resolved states, though
the Query
interface is quite a bit nicer.
Implementations
Attempt to reify the value of a logic variable in a resolved state.
Example:
use canrun::{State, ResolvedState, IterResolved, val, var}; use canrun::example::I32; let x = var(); let state = State::new() .unify(&val!(x), &val!(1)); let results: Vec<_> = state.iter_resolved() .map(|resolved: ResolvedState<I32>| resolved.reify(x)) .collect(); assert_eq!(results, vec![Some(1)]);
Trait Implementations
Auto Trait Implementations
impl<D> RefUnwindSafe for ResolvedState<D> where
D: RefUnwindSafe,
impl<D> Send for ResolvedState<D> where
D: Send,
impl<D> Sync for ResolvedState<D> where
D: Sync,
impl<D> Unpin for ResolvedState<D> where
D: Unpin,
impl<D> UnwindSafe for ResolvedState<D> where
D: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self