pub struct DiscoverService { /* private fields */ }Expand description
Service for pattern-based symbol discovery operations.
Implementations§
Source§impl DiscoverService
impl DiscoverService
Sourcepub fn new(ctx: AnalysisContext) -> Self
pub fn new(ctx: AnalysisContext) -> Self
Create a new DiscoverService from a pre-built AnalysisContext.
Use this when you have a cached or pre-built context (e.g., from CLI).
Sourcepub fn from_project(project: &Project) -> Result<Self, DiscoverError>
pub fn from_project(project: &Project) -> Result<Self, DiscoverError>
Create a new DiscoverService from a project.
Uses Project’s workspace_root for accurate crate name resolution.
Sourcepub fn from_path(path: &Path) -> Result<Self, DiscoverError>
pub fn from_path(path: &Path) -> Result<Self, DiscoverError>
Create a new DiscoverService from a path.
Sourcepub fn context(&self) -> &AnalysisContext
pub fn context(&self) -> &AnalysisContext
Get the underlying AnalysisContext.
Sourcepub fn registry(&self) -> &SymbolRegistry
pub fn registry(&self) -> &SymbolRegistry
Get the symbol registry.
Sourcepub fn discover(&self, query: &DiscoveryQuery) -> DiscoveryResult
pub fn discover(&self, query: &DiscoveryQuery) -> DiscoveryResult
Execute a discovery query.
Sourcepub fn find_symbols(&self, pattern: &str) -> DiscoveryResult
pub fn find_symbols(&self, pattern: &str) -> DiscoveryResult
Discover symbols matching a pattern.
Sourcepub fn find_symbols_by_kind(
&self,
pattern: &str,
kind: SymbolKind,
) -> DiscoveryResult
pub fn find_symbols_by_kind( &self, pattern: &str, kind: SymbolKind, ) -> DiscoveryResult
Discover symbols matching a pattern with kind filter.
Sourcepub fn find_with_relations(
&self,
pattern: &str,
depth: usize,
) -> DiscoveryResult
pub fn find_with_relations( &self, pattern: &str, depth: usize, ) -> DiscoveryResult
Discover symbols with relation expansion.
Sourcepub fn find_cascade_effects(
&self,
enum_pattern: &str,
variant_name: Option<&str>,
variant_type: Option<&str>,
) -> CascadeResult
pub fn find_cascade_effects( &self, enum_pattern: &str, variant_name: Option<&str>, variant_type: Option<&str>, ) -> CascadeResult
Find cascade effects for an enum (match expressions that need new arms).
Delegates to the freestanding [find_cascade_effects] function.
Sourcepub fn find_remove_cascade_effects(
&self,
enum_pattern: &str,
variant_name: &str,
) -> CascadeResult
pub fn find_remove_cascade_effects( &self, enum_pattern: &str, variant_name: &str, ) -> CascadeResult
Find cascade effects for removing a variant (match arms that should be deleted).
Delegates to the freestanding [find_remove_cascade_effects] function.
Auto Trait Implementations§
impl Freeze for DiscoverService
impl RefUnwindSafe for DiscoverService
impl Send for DiscoverService
impl Sync for DiscoverService
impl Unpin for DiscoverService
impl UnsafeUnpin for DiscoverService
impl UnwindSafe for DiscoverService
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> 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>
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 more