Skip to main content

Module rust

Module rust 

Source

Constants§

ASSIGNMENT_QUERY
Tree-sitter query for extracting variable assignments and reassignments.
CALL_QUERY
Tree-sitter query for extracting function calls.
ELEMENT_QUERY
Tree-sitter query for extracting Rust elements (functions and structs/enums/traits).
FIELD_QUERY
Tree-sitter query for extracting field access patterns.
IMPL_QUERY
Tree-sitter query for extracting impl blocks and methods.
IMPORT_QUERY
Tree-sitter query for extracting imports.
REFERENCE_QUERY
Tree-sitter query for extracting type references.

Functions§

extract_function_name
Extract function name from a function node.
extract_inheritance
Extract inheritance information from a Rust class node. Rust class nodes (struct_item, enum_item, trait_item) have no syntactic inheritance. Inheritance is via impl blocks, not on the type declaration itself.
find_method_for_receiver
Find method name for a receiver type.
find_receiver_type
Find receiver type for a method.