struct NestedGoals<X: Cx> {
nested_goals: HashMap<X::Input, PathsToNested>,
}
Expand description
The nested goals of each stack entry and the path from the stack entry to that nested goal.
They are used when checking whether reevaluating a global cache would encounter a cycle or use a provisional cache entry given the current search graph state. We need to disable the global cache in this case as it could otherwise result in behavioral differences. Cycles can impact behavior. The cycle ABA may have different final results from a the cycle BAB depending on the cycle root.
We only start tracking nested goals once we’ve either encountered overflow or a solver cycle. This is a performance optimization to avoid tracking nested goals on the happy path.
Fields§
§nested_goals: HashMap<X::Input, PathsToNested>
Implementations§
Source§impl<X: Cx> NestedGoals<X>
impl<X: Cx> NestedGoals<X>
fn is_empty(&self) -> bool
fn insert(&mut self, input: X::Input, paths_to_nested: PathsToNested)
Sourcefn extend_from_child(
&mut self,
step_kind: PathKind,
nested_goals: &NestedGoals<X>,
)
fn extend_from_child( &mut self, step_kind: PathKind, nested_goals: &NestedGoals<X>, )
Adds the nested goals of a nested goal, given that the path step_kind
from this goal
to the parent goal.
If the path from this goal to the nested goal is inductive, the paths from this goal to all nested goals of that nested goal are also inductive. Otherwise the paths are the same as for the child.
fn iter(&self) -> impl Iterator<Item = (X::Input, PathsToNested)> + '_
fn contains(&self, input: X::Input) -> bool
Trait Implementations§
Source§impl<X> Clone for NestedGoals<X>where
X: Cx,
impl<X> Clone for NestedGoals<X>where
X: Cx,
Source§impl<X> Debug for NestedGoals<X>where
X: Cx,
impl<X> Debug for NestedGoals<X>where
X: Cx,
Auto Trait Implementations§
impl<X> DynSend for NestedGoals<X>
impl<X> DynSync for NestedGoals<X>
impl<X> Freeze for NestedGoals<X>
impl<X> RefUnwindSafe for NestedGoals<X>
impl<X> Send for NestedGoals<X>
impl<X> Sync for NestedGoals<X>
impl<X> Unpin for NestedGoals<X>
impl<X> UnwindSafe for NestedGoals<X>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
Source§impl<I, T> UpcastFrom<I, T> for T
impl<I, T> UpcastFrom<I, T> for T
fn upcast_from(from: T, _tcx: I) -> T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes