pub trait Visitor<'a> {
Show 18 methods
// Required methods
fn cursor(&self) -> &TreeCursor<'a>;
fn cursor_mut(&mut self) -> &mut TreeCursor<'a>;
fn source(&self) -> &Rope;
fn push_err_raw(&mut self, err: ErrorInfo);
// Provided methods
fn skip_extra(&mut self) -> bool { ... }
fn goto_first_child(&mut self) -> bool { ... }
fn goto_named(&mut self) -> bool { ... }
fn goto_next_sibling(&mut self) -> bool { ... }
fn goto_parent(&mut self) { ... }
fn kind(&self) -> &str { ... }
fn node(&self) -> Node<'a> { ... }
fn child_by_name(&self, name: &str) -> Option<Node<'a>> { ... }
fn goto_next_kind(&mut self, kind: &str) -> bool { ... }
fn goto_field(&mut self, name: &str) -> bool { ... }
fn goto_kind(&mut self, name: &str) -> bool { ... }
fn push_error<T: Into<String>>(&mut self, w: u32, error: T) { ... }
fn push_error_with_type<T: Into<String>>(
&mut self,
w: u32,
error: T,
error_type: ErrorType,
) { ... }
fn push_error_node<T: Into<String>>(
&mut self,
node: Node<'_>,
w: u32,
error: T,
) { ... }
}
Required Methods§
fn cursor(&self) -> &TreeCursor<'a>
fn cursor_mut(&mut self) -> &mut TreeCursor<'a>
fn source(&self) -> &Rope
fn push_err_raw(&mut self, err: ErrorInfo)
Provided Methods§
fn skip_extra(&mut self) -> bool
sourcefn goto_first_child(&mut self) -> bool
fn goto_first_child(&mut self) -> bool
try to go down
sourcefn goto_named(&mut self) -> bool
fn goto_named(&mut self) -> bool
try to goto a named node on the current layer
fn goto_next_sibling(&mut self) -> bool
fn goto_parent(&mut self)
fn kind(&self) -> &str
fn node(&self) -> Node<'a>
fn child_by_name(&self, name: &str) -> Option<Node<'a>>
sourcefn goto_next_kind(&mut self, kind: &str) -> bool
fn goto_next_kind(&mut self, kind: &str) -> bool
try to go forward at least once until we find a node of kind
sourcefn goto_field(&mut self, name: &str) -> bool
fn goto_field(&mut self, name: &str) -> bool
try to go forward until we find a node as a field name
sourcefn goto_kind(&mut self, name: &str) -> bool
fn goto_kind(&mut self, name: &str) -> bool
try to go forward until we find a node of kind name
fn push_error<T: Into<String>>(&mut self, w: u32, error: T)
fn push_error_with_type<T: Into<String>>( &mut self, w: u32, error: T, error_type: ErrorType, )
fn push_error_node<T: Into<String>>(&mut self, node: Node<'_>, w: u32, error: T)
Object Safety§
This trait is not object safe.