Struct miri::borrow_tracker::tree_borrows::tree::TreeVisitorStack

source ·
struct TreeVisitorStack<NodeApp, ErrHandler> {
    initial: UniIndex,
    f_propagate: NodeApp,
    err_builder: ErrHandler,
    stack: Vec<(UniIndex, AccessRelatedness)>,
}
Expand description

Stack of nodes left to explore in a tree traversal.

Fields§

§initial: UniIndex

Identifier of the original access.

§f_propagate: NodeApp

Function to apply to each tag.

§err_builder: ErrHandler

Handler to add the required context to diagnostics.

§stack: Vec<(UniIndex, AccessRelatedness)>

Mutable state of the visit: the tags left to handle. Every tag pushed should eventually be handled, and the precise order is relevant for diagnostics.

Implementations§

source§

impl<NodeApp, InnErr, OutErr, ErrHandler> TreeVisitorStack<NodeApp, ErrHandler>
where NodeApp: Fn(NodeAppArgs<'_>) -> Result<ContinueTraversal, InnErr>, ErrHandler: Fn(ErrHandlerArgs<'_, InnErr>) -> OutErr,

source

fn exec_and_visit( &mut self, this: &mut TreeVisitor<'_>, idx: UniIndex, exclude: Option<UniIndex>, rel_pos: AccessRelatedness ) -> Result<(), OutErr>

Apply the function to the current tag, and push its children to the stack of future tags to visit.

source

fn new(initial: UniIndex, f_propagate: NodeApp, err_builder: ErrHandler) -> Self

source

fn finish(&mut self, visitor: &mut TreeVisitor<'_>) -> Result<(), OutErr>

Finish the exploration by applying exec_and_visit until the stack is empty.

source

fn push_and_visit_strict_ancestors( &mut self, visitor: &mut TreeVisitor<'_> ) -> Result<(), OutErr>

Push all ancestors to the exploration stack in order of nearest ancestor towards the top.

Auto Trait Implementations§

§

impl<NodeApp, ErrHandler> Freeze for TreeVisitorStack<NodeApp, ErrHandler>
where NodeApp: Freeze, ErrHandler: Freeze,

§

impl<NodeApp, ErrHandler> RefUnwindSafe for TreeVisitorStack<NodeApp, ErrHandler>
where NodeApp: RefUnwindSafe, ErrHandler: RefUnwindSafe,

§

impl<NodeApp, ErrHandler> Send for TreeVisitorStack<NodeApp, ErrHandler>
where NodeApp: Send, ErrHandler: Send,

§

impl<NodeApp, ErrHandler> Sync for TreeVisitorStack<NodeApp, ErrHandler>
where NodeApp: Sync, ErrHandler: Sync,

§

impl<NodeApp, ErrHandler> Unpin for TreeVisitorStack<NodeApp, ErrHandler>
where NodeApp: Unpin, ErrHandler: Unpin,

§

impl<NodeApp, ErrHandler> UnwindSafe for TreeVisitorStack<NodeApp, ErrHandler>
where NodeApp: UnwindSafe, ErrHandler: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Layout§

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.