Struct expr::relation::MirRelationExprVisitor [−][src]
struct MirRelationExprVisitor {
recursion_guard: RecursionGuard,
}
Fields
recursion_guard: RecursionGuard
Implementations
Contains visitor implementations.
[child, pre, post] x [fallible, infallible] x [immutable, mutable]
Constructs a new MirRelationExprVisitor using a RecursionGuard
with RECURSION_LIMIT
.
fn try_visit_children<'a, F, E>(
&self,
expr: &'a MirRelationExpr,
f: F
) -> Result<(), E> where
F: FnMut(&'a MirRelationExpr) -> Result<(), E>,
fn try_visit_children<'a, F, E>(
&self,
expr: &'a MirRelationExpr,
f: F
) -> Result<(), E> where
F: FnMut(&'a MirRelationExpr) -> Result<(), E>,
Applies a fallible immutable f
to each expr
child of type MirRelationExpr
.
fn try_visit_mut_children<'a, F, E>(
&self,
expr: &'a mut MirRelationExpr,
f: F
) -> Result<(), E> where
F: FnMut(&'a mut MirRelationExpr) -> Result<(), E>,
fn try_visit_mut_children<'a, F, E>(
&self,
expr: &'a mut MirRelationExpr,
f: F
) -> Result<(), E> where
F: FnMut(&'a mut MirRelationExpr) -> Result<(), E>,
Applies a fallible mutable f
to each expr
child of type MirRelationExpr
.
fn visit_children<'a, F>(&self, expr: &'a MirRelationExpr, f: F) where
F: FnMut(&'a MirRelationExpr),
fn visit_children<'a, F>(&self, expr: &'a MirRelationExpr, f: F) where
F: FnMut(&'a MirRelationExpr),
Applies an infallible immutable f
to each expr
child of type MirRelationExpr
.
fn visit_mut_children<'a, F>(&self, expr: &'a mut MirRelationExpr, f: F) where
F: FnMut(&'a mut MirRelationExpr),
fn visit_mut_children<'a, F>(&self, expr: &'a mut MirRelationExpr, f: F) where
F: FnMut(&'a mut MirRelationExpr),
Applies an infallible mutable f
to each expr
child of type MirRelationExpr
.
fn try_visit_post<'a, F, E>(
&self,
expr: &'a MirRelationExpr,
f: &mut F
) -> Result<(), E> where
F: FnMut(&'a MirRelationExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
fn try_visit_post<'a, F, E>(
&self,
expr: &'a MirRelationExpr,
f: &mut F
) -> Result<(), E> where
F: FnMut(&'a MirRelationExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
Post-order immutable fallible MirRelationExpr
visitor for expr
.
fn try_visit_mut_post<F, E>(
&self,
expr: &mut MirRelationExpr,
f: &mut F
) -> Result<(), E> where
F: FnMut(&mut MirRelationExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
fn try_visit_mut_post<F, E>(
&self,
expr: &mut MirRelationExpr,
f: &mut F
) -> Result<(), E> where
F: FnMut(&mut MirRelationExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
Post-order mutable fallible MirRelationExpr
visitor for expr
.
fn visit_post<'a, F>(&self, expr: &'a MirRelationExpr, f: &mut F) where
F: FnMut(&'a MirRelationExpr),
fn visit_post<'a, F>(&self, expr: &'a MirRelationExpr, f: &mut F) where
F: FnMut(&'a MirRelationExpr),
Post-order immutable infallible MirRelationExpr
visitor for expr
.
fn visit_mut_post<F>(&self, expr: &mut MirRelationExpr, f: &mut F) where
F: FnMut(&mut MirRelationExpr),
fn visit_mut_post<F>(&self, expr: &mut MirRelationExpr, f: &mut F) where
F: FnMut(&mut MirRelationExpr),
Post-order mutable infallible MirRelationExpr
visitor for expr
.
fn try_visit_pre<F, E>(
&self,
expr: &MirRelationExpr,
f: &mut F
) -> Result<(), E> where
F: FnMut(&MirRelationExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
fn try_visit_pre<F, E>(
&self,
expr: &MirRelationExpr,
f: &mut F
) -> Result<(), E> where
F: FnMut(&MirRelationExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
Pre-order immutable fallible MirRelationExpr
visitor for expr
.
fn try_visit_mut_pre<F, E>(
&self,
expr: &mut MirRelationExpr,
f: &mut F
) -> Result<(), E> where
F: FnMut(&mut MirRelationExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
fn try_visit_mut_pre<F, E>(
&self,
expr: &mut MirRelationExpr,
f: &mut F
) -> Result<(), E> where
F: FnMut(&mut MirRelationExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
Pre-order mutable fallible MirRelationExpr
visitor for expr
.
Pre-order immutable infallible MirRelationExpr
visitor for expr
.
fn visit_mut_pre<F>(&self, expr: &mut MirRelationExpr, f: &mut F) where
F: FnMut(&mut MirRelationExpr),
fn visit_mut_pre<F>(&self, expr: &mut MirRelationExpr, f: &mut F) where
F: FnMut(&mut MirRelationExpr),
Pre-order mutable infallible MirRelationExpr
visitor for expr
.
fn visit_pre_post<F1, F2>(
&self,
expr: &MirRelationExpr,
pre: &mut F1,
post: &mut F2
) where
F1: FnMut(&MirRelationExpr) -> Option<Vec<&MirRelationExpr>>,
F2: FnMut(&MirRelationExpr),
fn visit_pre_post<F1, F2>(
&self,
expr: &MirRelationExpr,
pre: &mut F1,
post: &mut F2
) where
F1: FnMut(&MirRelationExpr) -> Option<Vec<&MirRelationExpr>>,
F2: FnMut(&MirRelationExpr),
A generalization of Self::visit_pre
and Self::visit_post
.
The function pre
runs on a MirRelationExpr
before it runs on any of the
child MirRelationExpr
s. The function post
runs on child MirRelationExpr
s
first before the parent.
Optionally, pre
can return which child MirRelationExpr
s, if any, should be
visited (default is to visit all children).
fn try_visit_scalar_children_mut<F, E>(
&self,
expr: &mut MirRelationExpr,
f: &mut F
) -> Result<(), E> where
F: FnMut(&mut MirScalarExpr) -> Result<(), E>,
fn try_visit_scalar_children_mut<F, E>(
&self,
expr: &mut MirRelationExpr,
f: &mut F
) -> Result<(), E> where
F: FnMut(&mut MirScalarExpr) -> Result<(), E>,
Fallible visitor for the MirScalarExpr
s directly owned by this relation expression.
The f
visitor should not recursively descend into owned MirRelationExpr
s.
fn try_visit_scalars_mut<F, E>(
&self,
expr: &mut MirRelationExpr,
f: &mut F
) -> Result<(), E> where
F: FnMut(&mut MirScalarExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
fn try_visit_scalars_mut<F, E>(
&self,
expr: &mut MirRelationExpr,
f: &mut F
) -> Result<(), E> where
F: FnMut(&mut MirScalarExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
Fallible mutable visitor for all MirScalarExpr
s in the MirRelationExpr
subtree rooted at expr
.
Note that this does not recurse into MirRelationExpr
subtrees wrapped in MirScalarExpr
nodes.
fn visit_scalars_mut<F>(&self, expr: &mut MirRelationExpr, f: &mut F) where
F: FnMut(&mut MirScalarExpr),
fn visit_scalars_mut<F>(&self, expr: &mut MirRelationExpr, f: &mut F) where
F: FnMut(&mut MirScalarExpr),
Infallible mutable visitor for the MirScalarExpr
s in the MirRelationExpr
subtree rooted at expr
.
Note that this does not recurse into MirRelationExpr
subtrees within MirScalarExpr
nodes.
Trait Implementations
Add checked recursion support for MirRelationExprVisitor
.
Extracts a reference to the recursion guard embedded within the type.
fn checked_recur<F, T, E>(&self, f: F) -> Result<T, E> where
F: FnOnce(&Self) -> Result<T, E>,
E: From<RecursionLimitError>,
fn checked_recur<F, T, E>(&self, f: F) -> Result<T, E> where
F: FnOnce(&Self) -> Result<T, E>,
E: From<RecursionLimitError>,
Checks whether it is safe to recur and calls f
if so. Read more
fn checked_recur_mut<F, T, E>(&mut self, f: F) -> Result<T, E> where
F: FnOnce(&mut Self) -> Result<T, E>,
E: From<RecursionLimitError>,
fn checked_recur_mut<F, T, E>(&mut self, f: F) -> Result<T, E> where
F: FnOnce(&mut Self) -> Result<T, E>,
E: From<RecursionLimitError>,
Like CheckedRecursion::checked_recur
, but operates on a mutable
reference to Self
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for MirRelationExprVisitor
impl Send for MirRelationExprVisitor
impl !Sync for MirRelationExprVisitor
impl Unpin for MirRelationExprVisitor
impl UnwindSafe for MirRelationExprVisitor
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more