pub enum VisitFlow {
Next,
Break,
Skip,
}
Expand description
A visitor signal that is returned from Visitor callbacks to alter the flow of traversal.
The default callbacks all return VisitFlow::Next
, which continues the depth-first traversal. The
other signals may be used to skip over a node in a before_
callback or to abort traversal
entirely without visiting any more AST Nodes.
Variants§
Next
Continue visiting nodes as usual.
Break
Abort the traversal without performing any subsequent visits.
Skip
Skip over the current node without performing any deeper traversal.
(Only applies to enter_
callbacks)
Trait Implementations§
impl Copy for VisitFlow
impl Eq for VisitFlow
impl StructuralPartialEq for VisitFlow
Auto Trait Implementations§
impl Freeze for VisitFlow
impl RefUnwindSafe for VisitFlow
impl Send for VisitFlow
impl Sync for VisitFlow
impl Unpin for VisitFlow
impl UnwindSafe for VisitFlow
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
Mutably borrows from an owned value. Read more