rustExtractor.getVisibility: direct `visibility_modifier` child whose text contains `pub` → public, else private; none → private.
(&self, node: Node)
| 383 | /// rustExtractor.getVisibility: direct `visibility_modifier` child whose |
| 384 | /// text contains `pub` → public, else private; none → private. |
| 385 | fn visibility_of(&self, node: Node) -> u8 { |
| 386 | for i in 0..node.child_count() { |
| 387 | if let Some(c) = node.child(i) { |
| 388 | if c.kind() == "visibility_modifier" { |
| 389 | return if self.text(c).contains("pub") { 1 } else { 2 }; |
| 390 | } |
| 391 | } |
| 392 | } |
| 393 | 2 // private — Rust defaults to private |
| 394 | } |
| 395 | |
| 396 | /// extractRustReturnType (languages/rust.ts:14). |
| 397 | fn return_type_of(&self, node: Node) -> Option<String> { |
no test coverage detected