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