pub struct DiscoveryResult {
pub symbols: Vec<DiscoveredSymbol>,
pub relations: Option<RelationGraph>,
pub total_matches: usize,
pub truncated: bool,
}Expand description
Result of a discovery query.
Fields§
§symbols: Vec<DiscoveredSymbol>Discovered symbols.
relations: Option<RelationGraph>Relation graph (if relations were requested).
total_matches: usizeTotal matches before limit was applied.
truncated: boolWhether results were truncated by limit.
Implementations§
Source§impl DiscoveryResult
impl DiscoveryResult
Sourcepub fn new() -> DiscoveryResult
pub fn new() -> DiscoveryResult
Create an empty result.
Sourcepub fn add(&mut self, symbol: DiscoveredSymbol)
pub fn add(&mut self, symbol: DiscoveredSymbol)
Add a discovered symbol.
Sourcepub fn first(&self) -> Option<&DiscoveredSymbol>
pub fn first(&self) -> Option<&DiscoveredSymbol>
Get the first symbol.
Sourcepub fn iter(&self) -> impl Iterator<Item = &DiscoveredSymbol>
pub fn iter(&self) -> impl Iterator<Item = &DiscoveredSymbol>
Iterate over symbols.
Sourcepub fn paths(&self) -> impl Iterator<Item = &SymbolPath>
pub fn paths(&self) -> impl Iterator<Item = &SymbolPath>
Get symbols as paths.
Trait Implementations§
Source§impl Clone for DiscoveryResult
impl Clone for DiscoveryResult
Source§fn clone(&self) -> DiscoveryResult
fn clone(&self) -> DiscoveryResult
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 DiscoveryResult
impl Debug for DiscoveryResult
Source§impl Default for DiscoveryResult
impl Default for DiscoveryResult
Source§fn default() -> DiscoveryResult
fn default() -> DiscoveryResult
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DiscoveryResult
impl RefUnwindSafe for DiscoveryResult
impl Send for DiscoveryResult
impl Sync for DiscoveryResult
impl Unpin for DiscoveryResult
impl UnsafeUnpin for DiscoveryResult
impl UnwindSafe for DiscoveryResult
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