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) -> Self
pub fn new(id: SymbolId, path: SymbolPath, kind: SymbolKind) -> Self
Create a new discovered symbol.
Sourcepub fn with_visibility(self, visibility: Visibility) -> Self
pub fn with_visibility(self, visibility: Visibility) -> Self
Set the visibility.
Sourcepub fn with_score(self, score: f32) -> Self
pub fn with_score(self, score: f32) -> Self
Set the match score.
Sourcepub fn with_ref_count(self, ref_count: usize) -> Self
pub fn with_ref_count(self, ref_count: usize) -> Self
Set the reference count.
Sourcepub fn with_impl_count(self, impl_count: usize) -> Self
pub fn with_impl_count(self, impl_count: usize) -> Self
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
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> 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