extractInterface — kind `trait` (interfaceKind), inheritance from trait_bounds, body children visited with the trait pushed.
(&mut self, node: Node<'t>)
| 619 | /// extractInterface — kind `trait` (interfaceKind), inheritance from |
| 620 | /// trait_bounds, body children visited with the trait pushed. |
| 621 | fn extract_interface(&mut self, node: Node<'t>) { |
| 622 | stack_guard!(); |
| 623 | let name = self.extract_name(node); |
| 624 | let extra = Extra { |
| 625 | docstring: preceding_docstring(node, self.src), |
| 626 | ..Extra::default() // no visibility/isExported on the interface path |
| 627 | }; |
| 628 | let Some(row) = self.create_node("trait", &name, node, extra) else { return }; |
| 629 | self.extract_inheritance(node, row); |
| 630 | |
| 631 | self.stack.push(Scope { row, kind: "trait", name }); |
| 632 | let body = node.child_by_field_name("body").unwrap_or(node); |
| 633 | for c in body.named_children(&mut body.walk()) { |
| 634 | self.visit_node(c); |
| 635 | } |
| 636 | self.stack.pop(); |
| 637 | } |
| 638 | |
| 639 | /// Extract a Rust struct or union — the body field is OPTIONAL. A unit |
| 640 | /// struct (`struct U;`) has no body and is still a complete definition, |
no test coverage detected