pub struct FunctionDecl {
pub full_name: String,
pub file: String,
pub line: usize,
pub returns: String,
pub parameters: Vec<String>,
pub docstring: Option<String>,
pub attributes: Vec<String>,
pub calls: Vec<String>,
}Expand description
Represents a function or method found in the source code.
Fields§
§full_name: StringFully qualified name (e.g. "my_mod::Auth::validate" or "free_function").
file: StringFile path relative to the subproject root.
line: usizeLine number of the function definition.
returns: StringString representation of the return type (e.g. "Result<(), Error>").
parameters: Vec<String>List of parameters in "name: Type" format.
docstring: Option<String>Documentation comment text (if any), with newlines preserved.
attributes: Vec<String>List of attributes and qualifiers:
- Language keywords:
"pub","async","unsafe","const" - Attribute macros:
"#[test]","#[instrument]"
calls: Vec<String>List of meaningful called function names (filtered for noise).
Trait Implementations§
Source§impl Clone for FunctionDecl
impl Clone for FunctionDecl
Source§fn clone(&self) -> FunctionDecl
fn clone(&self) -> FunctionDecl
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FunctionDecl
impl RefUnwindSafe for FunctionDecl
impl Send for FunctionDecl
impl Sync for FunctionDecl
impl Unpin for FunctionDecl
impl UnwindSafe for FunctionDecl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more