pub struct NodeCounter<'a> {
pub count: usize,
/* private fields */
}Fields§
§count: usizeImplementations§
Trait Implementations§
Source§impl Visitor for NodeCounter<'_>
impl Visitor for NodeCounter<'_>
fn language(&self) -> &Box<dyn Language + Sync>
fn process_node(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_invisible_container(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_if(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_elsif(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_else(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_conditional_assignment(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_ternary(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_switch(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_case(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_loop(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_except(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_try_expression(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_jump(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_return(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_binary(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_field(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_call(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_function(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_closure(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_comment(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_string(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_block(&mut self, cursor: &mut TreeCursor<'_>)
fn visit_unknown(&mut self, cursor: &mut TreeCursor<'_>)
fn process_children(&mut self, cursor: &mut TreeCursor<'_>)
fn skip_node(&self, node: &Node<'_>) -> bool
Auto Trait Implementations§
impl<'a> Freeze for NodeCounter<'a>
impl<'a> RefUnwindSafe for NodeCounter<'a>
impl<'a> Send for NodeCounter<'a>
impl<'a> Sync for NodeCounter<'a>
impl<'a> Unpin for NodeCounter<'a>
impl<'a> UnwindSafe for NodeCounter<'a>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more