pub struct CountingVisitorExt {
pub counts: HashMap<String, usize>,
pub depth: usize,
}Expand description
A counting visitor that counts each kind.
Fields§
§counts: HashMap<String, usize>Map from node kind to count
depth: usizeCurrent depth
Implementations§
Trait Implementations§
Source§impl AstNodeVisitorExt for CountingVisitorExt
impl AstNodeVisitorExt for CountingVisitorExt
Source§fn visit_node(&mut self, kind: &str, _depth: usize)
fn visit_node(&mut self, kind: &str, _depth: usize)
Visit a node with the given kind label.
Auto Trait Implementations§
impl Freeze for CountingVisitorExt
impl RefUnwindSafe for CountingVisitorExt
impl Send for CountingVisitorExt
impl Sync for CountingVisitorExt
impl Unpin for CountingVisitorExt
impl UnsafeUnpin for CountingVisitorExt
impl UnwindSafe for CountingVisitorExt
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