pub struct DiscoveryQuery {
pub pattern: Pattern,
pub case_options: CaseOptions,
pub kinds: Option<Vec<SymbolKind>>,
pub in_crate: Option<String>,
pub in_module: Option<String>,
pub include_relations: bool,
pub relation_depth: usize,
pub limit: Option<usize>,
pub sort: SortOrder,
pub type_filter: Option<TypeFilter>,
}Expand description
Query specification for symbol discovery.
Fields§
§pattern: PatternName pattern to match.
case_options: CaseOptionsCase matching options.
kinds: Option<Vec<SymbolKind>>Filter by kinds.
in_crate: Option<String>Filter by crate.
in_module: Option<String>Filter by module path (partial match).
include_relations: boolInclude related symbols (callers, implementors, etc.).
relation_depth: usizeMaximum depth for relation traversal.
limit: Option<usize>Maximum results to return.
sort: SortOrderSort order for results.
type_filter: Option<TypeFilter>Type-based filter using TypeFlowGraph.
Implementations§
Source§impl DiscoveryQuery
impl DiscoveryQuery
Sourcepub fn symbol(pattern: impl Into<String>) -> DiscoveryQuery
pub fn symbol(pattern: impl Into<String>) -> DiscoveryQuery
Create a query matching symbol names.
Sourcepub fn symbol_with_options(
pattern: impl Into<String>,
case_options: CaseOptions,
) -> DiscoveryQuery
pub fn symbol_with_options( pattern: impl Into<String>, case_options: CaseOptions, ) -> DiscoveryQuery
Create a query matching symbol names with case options.
Sourcepub fn exact(name: impl Into<String>) -> DiscoveryQuery
pub fn exact(name: impl Into<String>) -> DiscoveryQuery
Create a query with exact name match.
Sourcepub fn regex(pattern: impl Into<String>) -> Result<DiscoveryQuery, PatternError>
pub fn regex(pattern: impl Into<String>) -> Result<DiscoveryQuery, PatternError>
Create a query with regex pattern.
Sourcepub fn ignore_case(self) -> DiscoveryQuery
pub fn ignore_case(self) -> DiscoveryQuery
Sourcepub fn ignore_word_separate(self) -> DiscoveryQuery
pub fn ignore_word_separate(self) -> DiscoveryQuery
Sourcepub fn kinds(self, kinds: Vec<SymbolKind>) -> DiscoveryQuery
pub fn kinds(self, kinds: Vec<SymbolKind>) -> DiscoveryQuery
Filter by specific kinds.
Sourcepub fn kind(self, kind: SymbolKind) -> DiscoveryQuery
pub fn kind(self, kind: SymbolKind) -> DiscoveryQuery
Filter by a single kind.
Sourcepub fn in_crate(self, crate_name: impl Into<String>) -> DiscoveryQuery
pub fn in_crate(self, crate_name: impl Into<String>) -> DiscoveryQuery
Filter by crate name.
Sourcepub fn in_module(self, module: impl Into<String>) -> DiscoveryQuery
pub fn in_module(self, module: impl Into<String>) -> DiscoveryQuery
Filter by module path.
Sourcepub fn with_relations(self) -> DiscoveryQuery
pub fn with_relations(self) -> DiscoveryQuery
Include related symbols in results.
Sourcepub fn relation_depth(self, depth: usize) -> DiscoveryQuery
pub fn relation_depth(self, depth: usize) -> DiscoveryQuery
Set relation traversal depth.
Sourcepub fn limit(self, limit: usize) -> DiscoveryQuery
pub fn limit(self, limit: usize) -> DiscoveryQuery
Limit the number of results.
Sourcepub fn sort(self, sort: SortOrder) -> DiscoveryQuery
pub fn sort(self, sort: SortOrder) -> DiscoveryQuery
Set sort order.
Sourcepub fn with_type_filter(self, filter: TypeFilter) -> DiscoveryQuery
pub fn with_type_filter(self, filter: TypeFilter) -> DiscoveryQuery
Add type-based filter.
Sourcepub fn returns(self, pattern: impl Into<String>) -> DiscoveryQuery
pub fn returns(self, pattern: impl Into<String>) -> DiscoveryQuery
Filter by return type pattern.
Sourcepub fn has_param_type(self, pattern: impl Into<String>) -> DiscoveryQuery
pub fn has_param_type(self, pattern: impl Into<String>) -> DiscoveryQuery
Filter by parameter type pattern.
Sourcepub fn has_field_type(self, pattern: impl Into<String>) -> DiscoveryQuery
pub fn has_field_type(self, pattern: impl Into<String>) -> DiscoveryQuery
Filter by field type pattern.
Trait Implementations§
Source§impl Clone for DiscoveryQuery
impl Clone for DiscoveryQuery
Source§fn clone(&self) -> DiscoveryQuery
fn clone(&self) -> DiscoveryQuery
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DiscoveryQuery
impl Debug for DiscoveryQuery
Source§impl Default for DiscoveryQuery
impl Default for DiscoveryQuery
Source§fn default() -> DiscoveryQuery
fn default() -> DiscoveryQuery
Source§impl<'de> Deserialize<'de> for DiscoveryQuery
impl<'de> Deserialize<'de> for DiscoveryQuery
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DiscoveryQuery, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DiscoveryQuery, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for DiscoveryQuery
impl Serialize for DiscoveryQuery
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 DiscoveryQuery
impl RefUnwindSafe for DiscoveryQuery
impl Send for DiscoveryQuery
impl Sync for DiscoveryQuery
impl Unpin for DiscoveryQuery
impl UnsafeUnpin for DiscoveryQuery
impl UnwindSafe for DiscoveryQuery
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> 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