[][src]Struct chalk_engine::forest::Forest

pub struct Forest<I: Interner, C: Context<I>> { /* fields omitted */ }

Implementations

impl<I: Interner, C: Context<I>> Forest<I, C>[src]

pub fn new() -> Self[src]

pub fn solve(
    &mut self,
    context: &impl ContextOps<I, C>,
    goal: &UCanonical<InEnvironment<Goal<I>>>,
    should_continue: impl Fn() -> bool
) -> Option<C::Solution>
[src]

Solves a given goal, producing the solution. This will do only as much work towards goal as it has to (and that works is cached for future attempts).

pub fn solve_multiple(
    &mut self,
    context: &impl ContextOps<I, C>,
    goal: &UCanonical<InEnvironment<Goal<I>>>,
    f: impl FnMut(SubstitutionResult<Canonical<ConstrainedSubst<I>>>, bool) -> bool
) -> bool
[src]

Solves a given goal, producing the solution. This will do only as much work towards goal as it has to (and that works is cached for future attempts). Calls provided function f to iterate over multiple solutions until the function return false.

Auto Trait Implementations

impl<I, C> RefUnwindSafe for Forest<I, C> where
    C: RefUnwindSafe,
    <I as Interner>::InternedCanonicalVarKinds: RefUnwindSafe,
    <I as Interner>::InternedGoal: RefUnwindSafe,
    <I as Interner>::InternedLifetime: RefUnwindSafe,
    <I as Interner>::InternedProgramClauses: RefUnwindSafe,
    <I as Interner>::InternedSubstitution: RefUnwindSafe

impl<I, C> Send for Forest<I, C> where
    C: Send,
    <I as Interner>::InternedCanonicalVarKinds: Send,
    <I as Interner>::InternedGoal: Send,
    <I as Interner>::InternedLifetime: Send,
    <I as Interner>::InternedProgramClauses: Send,
    <I as Interner>::InternedSubstitution: Send

impl<I, C> Sync for Forest<I, C> where
    C: Sync,
    <I as Interner>::InternedCanonicalVarKinds: Sync,
    <I as Interner>::InternedGoal: Sync,
    <I as Interner>::InternedLifetime: Sync,
    <I as Interner>::InternedProgramClauses: Sync,
    <I as Interner>::InternedSubstitution: Sync

impl<I, C> Unpin for Forest<I, C> where
    C: Unpin,
    <I as Interner>::InternedCanonicalVarKinds: Unpin,
    <I as Interner>::InternedGoal: Unpin,
    <I as Interner>::InternedLifetime: Unpin,
    <I as Interner>::InternedProgramClauses: Unpin,
    <I as Interner>::InternedSubstitution: Unpin

impl<I, C> UnwindSafe for Forest<I, C> where
    C: UnwindSafe,
    <I as Interner>::InternedCanonicalVarKinds: UnwindSafe,
    <I as Interner>::InternedGoal: UnwindSafe,
    <I as Interner>::InternedLifetime: UnwindSafe,
    <I as Interner>::InternedProgramClauses: UnwindSafe,
    <I as Interner>::InternedSubstitution: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Cast for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.