pub struct ExtractedSymbol {Show 18 fields
pub name: String,
pub qualified_name: Option<String>,
pub kind: SymbolKind,
pub start_line: usize,
pub end_line: usize,
pub start_col: usize,
pub end_col: usize,
pub signature: Option<String>,
pub visibility: Visibility,
pub doc_comment: Option<String>,
pub parent: Option<String>,
pub type_info: Option<String>,
pub parameters: Vec<Parameter>,
pub return_type: Option<String>,
pub exported: bool,
pub is_async: bool,
pub is_static: bool,
pub generics: Vec<String>,
}Expand description
A symbol extracted from AST parsing
Fields§
§name: StringSymbol name (e.g., “main”, “UserService”)
qualified_name: Option<String>Fully qualified name (e.g., “src/main.rs::main”)
kind: SymbolKindSymbol kind
start_line: usizeStart line (1-indexed)
end_line: usizeEnd line (1-indexed)
start_col: usizeStart column (0-indexed)
end_col: usizeEnd column (0-indexed)
signature: Option<String>Function/method signature (for display)
visibility: VisibilityVisibility modifier
doc_comment: Option<String>Doc comment (if present)
parent: Option<String>Parent symbol name (for nested symbols)
type_info: Option<String>Type information (return type or declared type)
parameters: Vec<Parameter>Function/method parameters
return_type: Option<String>Return type (if available)
exported: boolIs this exported/public?
is_async: boolIs this async?
is_static: boolIs this static?
generics: Vec<String>Generic type parameters
Implementations§
Source§impl ExtractedSymbol
impl ExtractedSymbol
Sourcepub fn new(
name: String,
kind: SymbolKind,
start_line: usize,
end_line: usize,
) -> Self
pub fn new( name: String, kind: SymbolKind, start_line: usize, end_line: usize, ) -> Self
Create a new ExtractedSymbol with required fields
Sourcepub fn with_qualified_name(self, name: impl Into<String>) -> Self
pub fn with_qualified_name(self, name: impl Into<String>) -> Self
Set the qualified name
Sourcepub fn with_columns(self, start_col: usize, end_col: usize) -> Self
pub fn with_columns(self, start_col: usize, end_col: usize) -> Self
Set column positions
Sourcepub fn with_signature(self, sig: impl Into<String>) -> Self
pub fn with_signature(self, sig: impl Into<String>) -> Self
Set the signature
Sourcepub fn with_visibility(self, vis: Visibility) -> Self
pub fn with_visibility(self, vis: Visibility) -> Self
Set visibility
Sourcepub fn with_doc_comment(self, doc: impl Into<String>) -> Self
pub fn with_doc_comment(self, doc: impl Into<String>) -> Self
Set doc comment
Sourcepub fn with_parent(self, parent: impl Into<String>) -> Self
pub fn with_parent(self, parent: impl Into<String>) -> Self
Set parent
Sourcepub fn with_return_type(self, ret: impl Into<String>) -> Self
pub fn with_return_type(self, ret: impl Into<String>) -> Self
Set return type
Sourcepub fn add_parameter(&mut self, param: Parameter)
pub fn add_parameter(&mut self, param: Parameter)
Add a parameter
Sourcepub fn add_generic(&mut self, generic: impl Into<String>)
pub fn add_generic(&mut self, generic: impl Into<String>)
Add a generic type parameter
Trait Implementations§
Source§impl Clone for ExtractedSymbol
impl Clone for ExtractedSymbol
Source§fn clone(&self) -> ExtractedSymbol
fn clone(&self) -> ExtractedSymbol
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 moreSource§impl Debug for ExtractedSymbol
impl Debug for ExtractedSymbol
Source§impl<'de> Deserialize<'de> for ExtractedSymbol
impl<'de> Deserialize<'de> for ExtractedSymbol
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ExtractedSymbol
impl RefUnwindSafe for ExtractedSymbol
impl Send for ExtractedSymbol
impl Sync for ExtractedSymbol
impl Unpin for ExtractedSymbol
impl UnwindSafe for ExtractedSymbol
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more