Trait Parallel
pub trait Parallel: Send + Sync {
// Required methods
fn create(&self) -> Self;
fn merge(&mut self, other: Self);
// Provided methods
fn after_stmts(&mut self, _stmts: &mut Vec<Stmt>) { ... }
fn after_module_items(&mut self, _stmts: &mut Vec<ModuleItem>) { ... }
}
Available on crate features
__ecma
and __utils
only.Required Methods§
fn create(&self) -> Self
fn create(&self) -> Self
Used to create visitor.
fn merge(&mut self, other: Self)
fn merge(&mut self, other: Self)
This can be called in anytime.
Provided Methods§
fn after_stmts(&mut self, _stmts: &mut Vec<Stmt>)
fn after_stmts(&mut self, _stmts: &mut Vec<Stmt>)
Invoked after visiting all Stmts, possibly in parallel.
fn after_module_items(&mut self, _stmts: &mut Vec<ModuleItem>)
fn after_module_items(&mut self, _stmts: &mut Vec<ModuleItem>)
Invoked after visiting all ModuleItems, possibly in parallel.
Object Safety§
This trait is not object safe.