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_with_options(
pattern: impl Into<String>,
case_options: CaseOptions,
) -> Self
pub fn symbol_with_options( pattern: impl Into<String>, case_options: CaseOptions, ) -> Self
Create a query matching symbol names with case options.
Sourcepub fn regex(pattern: impl Into<String>) -> Result<Self, PatternError>
pub fn regex(pattern: impl Into<String>) -> Result<Self, PatternError>
Create a query with regex pattern.
Sourcepub fn ignore_case(self) -> Self
pub fn ignore_case(self) -> Self
Sourcepub fn ignore_word_separate(self) -> Self
pub fn ignore_word_separate(self) -> Self
Sourcepub fn kinds(self, kinds: Vec<SymbolKind>) -> Self
pub fn kinds(self, kinds: Vec<SymbolKind>) -> Self
Filter by specific kinds.
Sourcepub fn kind(self, kind: SymbolKind) -> Self
pub fn kind(self, kind: SymbolKind) -> Self
Filter by a single kind.
Sourcepub fn with_relations(self) -> Self
pub fn with_relations(self) -> Self
Include related symbols in results.
Sourcepub fn relation_depth(self, depth: usize) -> Self
pub fn relation_depth(self, depth: usize) -> Self
Set relation traversal depth.
Sourcepub fn with_type_filter(self, filter: TypeFilter) -> Self
pub fn with_type_filter(self, filter: TypeFilter) -> Self
Add type-based filter.
Sourcepub fn has_param_type(self, pattern: impl Into<String>) -> Self
pub fn has_param_type(self, pattern: impl Into<String>) -> Self
Filter by parameter type pattern.
Sourcepub fn has_field_type(self, pattern: impl Into<String>) -> Self
pub fn has_field_type(self, pattern: impl Into<String>) -> Self
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
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 DiscoveryQuery
impl Debug for DiscoveryQuery
Source§impl Default for DiscoveryQuery
impl Default for DiscoveryQuery
Source§impl<'de> Deserialize<'de> for DiscoveryQuery
impl<'de> Deserialize<'de> for DiscoveryQuery
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
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