pub enum TransformResult<T> {
Unchanged,
Removed,
Changed(T),
Expanded(Vec<T>),
}Expand description
What a VisitorMut did to an element of the AST.
Variants§
Unchanged
No change.
Removed
Remove the element if possible. A required single child that is removed
is replaced with an EmptyStatement; an optional child becomes None;
a list element is dropped.
Changed(T)
Replace the element with the wrapped one.
Expanded(Vec<T>)
Replace the element with several (only valid inside a NodeList).
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for TransformResult<T>where
T: Freeze,
impl<T> RefUnwindSafe for TransformResult<T>where
T: RefUnwindSafe,
impl<T> Send for TransformResult<T>where
T: Send,
impl<T> Sync for TransformResult<T>where
T: Sync,
impl<T> Unpin for TransformResult<T>where
T: Unpin,
impl<T> UnsafeUnpin for TransformResult<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for TransformResult<T>where
T: UnwindSafe,
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