pub trait Traverse {
// Required methods
fn flat_map<'a, T, F>(
&'a self,
working_set: &'a StateWorkingSet<'_>,
f: &F,
) -> Vec<T>
where F: Fn(&'a Expression) -> Option<Vec<T>>;
fn find_map<'a, T, F>(
&'a self,
working_set: &'a StateWorkingSet<'_>,
f: &F,
) -> Option<T>
where F: Fn(&'a Expression) -> FindMapResult<T>;
}Expand description
Trait for traversing the AST
Required Methods§
Sourcefn flat_map<'a, T, F>(
&'a self,
working_set: &'a StateWorkingSet<'_>,
f: &F,
) -> Vec<T>
fn flat_map<'a, T, F>( &'a self, working_set: &'a StateWorkingSet<'_>, f: &F, ) -> Vec<T>
Generic function that do flat_map on an AST node concatenates all recursive results on sub-expressions
§Arguments
f- function that overrides the default behavior
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.