pub struct DiscoveredSymbol {
pub id: SymbolId,
pub uuid: Option<Uuid>,
pub path: SymbolPath,
pub kind: SymbolKind,
pub span: Option<FileSpan>,
pub visibility: Option<Visibility>,
pub score: f32,
pub ref_count: usize,
pub impl_count: usize,
}Expand description
A discovered symbol with metadata.
Fields§
§id: SymbolIdSymbol ID (session-volatile).
uuid: Option<Uuid>Persistent UUID for cross-session tracking.
This UUID survives server restarts and symbol renames.
Returns None if the symbol hasn’t been assigned a persistent ID.
path: SymbolPathSymbol path.
kind: SymbolKindSymbol kind.
span: Option<FileSpan>File location (if available).
visibility: Option<Visibility>Visibility (if available).
score: f32Match score (for ranking).
ref_count: usizeReference count (how often this symbol is used).
impl_count: usizeImpl count (number of implementations for traits).
Implementations§
Source§impl DiscoveredSymbol
impl DiscoveredSymbol
Sourcepub fn new(id: SymbolId, path: SymbolPath, kind: SymbolKind) -> DiscoveredSymbol
pub fn new(id: SymbolId, path: SymbolPath, kind: SymbolKind) -> DiscoveredSymbol
Create a new discovered symbol.
Sourcepub fn with_uuid(self, uuid: Uuid) -> DiscoveredSymbol
pub fn with_uuid(self, uuid: Uuid) -> DiscoveredSymbol
Set the persistent UUID.
Sourcepub fn with_span(self, span: FileSpan) -> DiscoveredSymbol
pub fn with_span(self, span: FileSpan) -> DiscoveredSymbol
Set the file span.
Sourcepub fn with_visibility(self, visibility: Visibility) -> DiscoveredSymbol
pub fn with_visibility(self, visibility: Visibility) -> DiscoveredSymbol
Set the visibility.
Sourcepub fn with_score(self, score: f32) -> DiscoveredSymbol
pub fn with_score(self, score: f32) -> DiscoveredSymbol
Set the match score.
Sourcepub fn with_ref_count(self, ref_count: usize) -> DiscoveredSymbol
pub fn with_ref_count(self, ref_count: usize) -> DiscoveredSymbol
Set the reference count.
Sourcepub fn with_impl_count(self, impl_count: usize) -> DiscoveredSymbol
pub fn with_impl_count(self, impl_count: usize) -> DiscoveredSymbol
Set the impl count.
Trait Implementations§
Source§impl Clone for DiscoveredSymbol
impl Clone for DiscoveredSymbol
Source§fn clone(&self) -> DiscoveredSymbol
fn clone(&self) -> DiscoveredSymbol
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DiscoveredSymbol
impl Debug for DiscoveredSymbol
Source§impl Serialize for DiscoveredSymbol
impl Serialize for DiscoveredSymbol
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,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for DiscoveredSymbol
impl RefUnwindSafe for DiscoveredSymbol
impl Send for DiscoveredSymbol
impl Sync for DiscoveredSymbol
impl Unpin for DiscoveredSymbol
impl UnsafeUnpin for DiscoveredSymbol
impl UnwindSafe for DiscoveredSymbol
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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