pub struct Symbol {
pub name: String,
pub kind: SymbolKind,
pub signature: String,
pub docstring: Option<String>,
pub attributes: Vec<String>,
pub start_line: usize,
pub end_line: usize,
pub visibility: Visibility,
pub children: Vec<Symbol>,
pub is_interface_impl: bool,
pub implements: Vec<String>,
}Expand description
A code symbol extracted from source
Fields§
§name: StringThe symbol’s unqualified name.
kind: SymbolKindClassification of the symbol (function, class, heading, etc.).
signature: StringFull signature string (e.g., fn foo(x: i32) -> bool). Empty if not applicable.
docstring: Option<String>Documentation comment or docstring attached to this symbol, if present.
attributes: Vec<String>Language-specific decorators, annotations, or attributes (e.g., #[derive(...)] in Rust,
@decorator in Python). Each entry is the raw text of one attribute.
start_line: usize1-based line number where the symbol starts.
end_line: usize1-based line number where the symbol ends (inclusive).
visibility: VisibilityVisibility of the symbol.
children: Vec<Symbol>Nested symbols (e.g., methods inside a class). Empty for leaf symbols.
is_interface_impl: boolTrue if this symbol implements an interface/trait (e.g., method in impl Trait for Type)
implements: Vec<String>Parent interfaces/classes this symbol extends or implements (for semantic matching)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Symbol
impl<'de> Deserialize<'de> for Symbol
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Symbol, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Symbol, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Symbol
impl Serialize for Symbol
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for Symbol
impl RefUnwindSafe for Symbol
impl Send for Symbol
impl Sync for Symbol
impl Unpin for Symbol
impl UnsafeUnpin for Symbol
impl UnwindSafe for Symbol
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
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request