#[non_exhaustive]pub struct NodeData {Show 18 fields
pub kind: String,
pub name: String,
pub exported: bool,
pub visibility: Option<String>,
pub is_async: Option<bool>,
pub is_unsafe: Option<bool>,
pub start_line: u32,
pub end_line: u32,
pub lines: u32,
pub params: Option<u32>,
pub field_count: Option<u32>,
pub depth: Option<u32>,
pub cyclomatic: Option<u32>,
pub trait_name: Option<String>,
pub git_churn_30d: Option<u32>,
pub coverage: Option<f64>,
pub co_changes: Option<HashMap<String, u32>>,
pub calls: Option<Vec<CallInfo>>,
}Expand description
A single AST node (function, struct, enum, impl, etc.).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.kind: StringNode kind: "function", "struct", "enum", "impl", "method", etc.
name: StringNode name (identifier).
exported: boolWhether this node is exported / publicly visible.
visibility: Option<String>Visibility qualifier (e.g. "pub", "pub(crate)").
is_async: Option<bool>Whether this function is async.
is_unsafe: Option<bool>Whether this function/trait is unsafe.
start_line: u32First line of the node (1-based).
end_line: u32Last line of the node (1-based, inclusive).
lines: u32Total line count (end_line - start_line + 1).
params: Option<u32>Number of parameters (functions/methods only).
field_count: Option<u32>Number of fields (structs/enums only).
depth: Option<u32>Maximum nesting depth.
cyclomatic: Option<u32>Cyclomatic complexity.
trait_name: Option<String>Trait name for impl blocks (e.g. "Display").
git_churn_30d: Option<u32>Git commit count within the churn period. Injected by enrichment.
coverage: Option<f64>Region coverage ratio (0.0–1.0). Injected by enrichment.
co_changes: Option<HashMap<String, u32>>Co-change counts: "partner_file::*" → commit_count.
Injected by enrichment.
calls: Option<Vec<CallInfo>>Internal function calls detected in the body.