MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / signature_of

Method signature_of

codegraph-kernel/src/rustlang.rs:361–369  ·  view source on GitHub ↗

rustExtractor.getSignature: raw params text + ` -> ` + raw return type.

(&self, node: Node)

Source from the content-addressed store, hash-verified

359
360 /// rustExtractor.getSignature: raw params text + ` -> ` + raw return type.
361 fn signature_of(&self, node: Node) -> Option<String> {
362 let params = node.child_by_field_name("parameters")?;
363 let mut sig = self.text(params).to_string();
364 if let Some(rt) = node.child_by_field_name("return_type") {
365 sig.push_str(" -> ");
366 sig.push_str(self.text(rt));
367 }
368 Some(sig)
369 }
370
371 /// rustExtractor.getVisibility: direct `visibility_modifier` child whose
372 /// text contains `pub` → public, else private; none → private.

Callers 1

extract_fn_or_methodMethod · 0.45

Calls 1

textMethod · 0.65

Tested by

no test coverage detected