pub struct FunctionCall {
pub callee: String,
pub line: usize,
pub end_line: usize,
pub snippet: String,
}Expand description
A function or method call-site in a Rust file.
Stores one example per unique callee name (deduplication happens in the parser). The snippet captures a window around the call so that MCP clients can show real usage patterns without additional disk I/O at query time.
§Snippet layout
[2 lines of context before the opening line]
[all lines of the call expression — may span many lines for multi-arg calls]
[4 lines of context after the closing line]Hard cap: 30 lines total. Lines are taken from the raw source file and include the original indentation.
Fields§
§callee: StringFull callee name as written in source, e.g. "scan_project",
"Arc::new", "db.execute", "tracing::info".
line: usize1-indexed line of the opening of the call expression (function name position).
end_line: usize1-indexed line of the closing parenthesis of the call expression.
Equals line for single-line calls.
snippet: StringMulti-line snippet centered on the call site (see type-level docs). Empty string if source was unavailable at parse time.
Trait Implementations§
Source§impl Clone for FunctionCall
impl Clone for FunctionCall
Source§fn clone(&self) -> FunctionCall
fn clone(&self) -> FunctionCall
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FunctionCall
impl Debug for FunctionCall
Source§impl<'de> Deserialize<'de> for FunctionCall
impl<'de> Deserialize<'de> for FunctionCall
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for FunctionCall
Source§impl PartialEq for FunctionCall
impl PartialEq for FunctionCall
Source§fn eq(&self, other: &FunctionCall) -> bool
fn eq(&self, other: &FunctionCall) -> bool
self and other values to be equal, and is used by ==.