pub(super) struct Stack<X: Cx> {
entries: IndexVec<StackDepth, StackEntry<X>>,
}Expand description
The stack of goals currently being computed.
An element is deeper in the stack if its index is lower.
Only the last entry of the stack is mutable. All other entries get
lazily updated in update_parent_goal.
Fields§
§entries: IndexVec<StackDepth, StackEntry<X>>Implementations§
Source§impl<X: Cx> Stack<X>
impl<X: Cx> Stack<X>
pub(super) fn is_empty(&self) -> bool
pub(super) fn len(&self) -> usize
pub(super) fn last(&self) -> Option<&StackEntry<X>>
pub(super) fn last_mut(&mut self) -> Option<&mut StackEntry<X>>
pub(super) fn last_mut_with_index( &mut self, ) -> Option<(StackDepth, &mut StackEntry<X>)>
pub(super) fn next_index(&self) -> StackDepth
pub(super) fn push(&mut self, entry: StackEntry<X>) -> StackDepth
pub(super) fn pop(&mut self) -> StackEntry<X>
pub(super) fn cycle_step_kinds( &self, head: StackDepth, ) -> impl Iterator<Item = PathKind>
pub(super) fn iter(&self) -> impl Iterator<Item = &StackEntry<X>>
pub(super) fn find(&self, input: X::Input) -> Option<StackDepth>
Trait Implementations§
Source§impl<X: Cx> Index<StackDepth> for Stack<X>
impl<X: Cx> Index<StackDepth> for Stack<X>
Source§type Output = StackEntry<X>
type Output = StackEntry<X>
The returned type after indexing.
Source§fn index(&self, index: StackDepth) -> &StackEntry<X>
fn index(&self, index: StackDepth) -> &StackEntry<X>
Performs the indexing (
container[index]) operation. Read moreAuto Trait Implementations§
impl<X> DynSend for Stack<X>
impl<X> DynSync for Stack<X>
impl<X> Freeze for Stack<X>
impl<X> RefUnwindSafe for Stack<X>
impl<X> Send for Stack<X>
impl<X> Sync for Stack<X>
impl<X> Unpin for Stack<X>
impl<X> UnwindSafe for Stack<X>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoEither for T
impl<T> IntoEither for T
§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
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 more§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
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 more§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
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> ErasedDestructor for Twhere
T: 'static,
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: 24 bytes