pub enum VisitAction<T: Sized> {
VisitChildren,
SkipChildren,
Replace(T),
ReplaceRecurseChildNodes(T),
ReplaceRecurse(T),
SetTypeRecurseChildNodes(Type),
SetTypeSkipChildren(Type),
ToNoop,
}Expand description
Actions that can be taken when visiting an expression
Variants§
VisitChildren
Continue visiting child nodes
SkipChildren
Skip visiting child nodes
Replace(T)
Replace the current node with a new one, skipping child nodes
ReplaceRecurseChildNodes(T)
Recurse into child nodes, then replace the current node with a new one
ReplaceRecurse(T)
Replace the current node with a new one, and recurse into it
SetTypeRecurseChildNodes(Type)
Set the type annotation of the current node, and recurse into child nodes
SetTypeSkipChildren(Type)
Set the type annotation of the current node, skipping child nodes
ToNoop
Convert the current node to a no-op
Trait Implementations§
Source§impl<T: Clone + Sized> Clone for VisitAction<T>
impl<T: Clone + Sized> Clone for VisitAction<T>
Source§fn clone(&self) -> VisitAction<T>
fn clone(&self) -> VisitAction<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for VisitAction<T>where
T: Freeze,
impl<T> !RefUnwindSafe for VisitAction<T>
impl<T> !Send for VisitAction<T>
impl<T> !Sync for VisitAction<T>
impl<T> Unpin for VisitAction<T>where
T: Unpin,
impl<T> !UnwindSafe for VisitAction<T>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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 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> ⓘ
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