pub enum Action {
Continue,
Stop,
SkipChildren,
Change(Box<Control>),
StaticChange(Box<StaticControl>),
}
Expand description
Action performed at the end of visiting a control statement.
Variants§
Continue
Continue traversal of control program.
Stop
Globally abort traversal of control program.
SkipChildren
Skips the traversal of this node’s children but continues traversing
the sibling nodes.
Change(Box<Control>)
Replace the current ast node with a new node. If performed using a start_* method, none of the newly created children will be visited.
StaticChange(Box<StaticControl>)
Replace the current StaticControl node with a new node If performed using a start_* method, none of the newly created children will be visited.
Implementations§
Source§impl Action
impl Action
pub fn change(control: Control) -> Self
pub fn static_change(control: StaticControl) -> Self
Auto Trait Implementations§
impl Freeze for Action
impl !RefUnwindSafe for Action
impl !Send for Action
impl !Sync for Action
impl Unpin for Action
impl !UnwindSafe for Action
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
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