Skip to main content Module rust Copy item path Source CALL_QUERY Tree-sitter query for extracting function calls. DEFUSE_QUERY Tree-sitter query for extracting definition and use sites.
Captures write sites (let declarations, assignment LHS), read sites (identifiers in expression context),
and write-read sites (compound assignments, +=, etc.). ELEMENT_QUERY Tree-sitter query for extracting Rust elements (functions and structs/enums/traits). IMPL_QUERY Tree-sitter query for extracting impl blocks and methods. IMPL_TRAIT_QUERY Tree-sitter query for extracting impl Trait for Type blocks.
Captures the trait name and the concrete implementor type. IMPORT_QUERY Tree-sitter query for extracting imports. REFERENCE_QUERY Tree-sitter query for extracting type references. 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.