pub struct OwnedScopeWalker<V> { /* private fields */ }Expand description
Drives an OwnedScopeVisitor over an owned AST, maintaining OwnedScope automatically.
Implementations§
Source§impl<V> OwnedScopeWalker<V>
impl<V> OwnedScopeWalker<V>
Sourcepub fn into_inner(self) -> V
pub fn into_inner(self) -> V
Consumes the walker and returns the inner visitor.
Source§impl<V: OwnedScopeVisitor> OwnedScopeWalker<V>
impl<V: OwnedScopeVisitor> OwnedScopeWalker<V>
Sourcepub fn walk(&mut self, program: &Program) -> ControlFlow<()>
pub fn walk(&mut self, program: &Program) -> ControlFlow<()>
Walks program, calling OwnedScopeVisitor methods with scope context.
Trait Implementations§
Source§impl<V: OwnedScopeVisitor> OwnedVisitor for OwnedScopeWalker<V>
impl<V: OwnedScopeVisitor> OwnedVisitor for OwnedScopeWalker<V>
fn visit_program(&mut self, program: &Program) -> ControlFlow<()>
fn visit_stmt(&mut self, stmt: &Stmt) -> ControlFlow<()>
fn visit_expr(&mut self, expr: &Expr) -> ControlFlow<()>
fn visit_class_member(&mut self, member: &ClassMember) -> ControlFlow<()>
fn visit_enum_member(&mut self, member: &EnumMember) -> ControlFlow<()>
fn visit_param(&mut self, param: &Param) -> ControlFlow<()>
fn visit_arg(&mut self, arg: &Arg) -> ControlFlow<()>
fn visit_property_hook(&mut self, hook: &PropertyHook) -> ControlFlow<()>
fn visit_type_hint(&mut self, type_hint: &TypeHint) -> ControlFlow<()>
fn visit_attribute(&mut self, attribute: &Attribute) -> ControlFlow<()>
fn visit_catch_clause(&mut self, catch: &CatchClause) -> ControlFlow<()>
fn visit_match_arm(&mut self, arm: &MatchArm) -> ControlFlow<()>
fn visit_closure_use_var(&mut self, var: &ClosureUseVar) -> ControlFlow<()>
fn visit_trait_use(&mut self, trait_use: &TraitUseDecl) -> ControlFlow<()>
fn visit_trait_adaptation( &mut self, adaptation: &TraitAdaptation, ) -> ControlFlow<()>
fn visit_comment(&mut self, comment: &Comment) -> ControlFlow<()>
fn visit_name(&mut self, _name: &Name) -> ControlFlow<()>
Auto Trait Implementations§
impl<V> Freeze for OwnedScopeWalker<V>where
V: Freeze,
impl<V> RefUnwindSafe for OwnedScopeWalker<V>where
V: RefUnwindSafe,
impl<V> Send for OwnedScopeWalker<V>where
V: Send,
impl<V> Sync for OwnedScopeWalker<V>where
V: Sync,
impl<V> Unpin for OwnedScopeWalker<V>where
V: Unpin,
impl<V> UnsafeUnpin for OwnedScopeWalker<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for OwnedScopeWalker<V>where
V: 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