pub struct QueryBuilder<'a> { /* private fields */ }Expand description
Fluent query builder for CodeGraphV2.
Implementations§
Source§impl<'a> QueryBuilder<'a>
impl<'a> QueryBuilder<'a>
Sourcepub fn new(
graph: &'a CodeGraphV2,
typeflow: &'a TypeFlowGraphV2,
registry: &'a SymbolRegistry,
) -> QueryBuilder<'a>
pub fn new( graph: &'a CodeGraphV2, typeflow: &'a TypeFlowGraphV2, registry: &'a SymbolRegistry, ) -> QueryBuilder<'a>
Create a new query builder.
Sourcepub fn functions(self) -> QueryBuilder<'a>
pub fn functions(self) -> QueryBuilder<'a>
Filter by functions.
Sourcepub fn structs(self) -> QueryBuilder<'a>
pub fn structs(self) -> QueryBuilder<'a>
Filter by structs.
Sourcepub fn enums(self) -> QueryBuilder<'a>
pub fn enums(self) -> QueryBuilder<'a>
Filter by enums.
Sourcepub fn traits(self) -> QueryBuilder<'a>
pub fn traits(self) -> QueryBuilder<'a>
Filter by traits.
Sourcepub fn modules(self) -> QueryBuilder<'a>
pub fn modules(self) -> QueryBuilder<'a>
Filter by modules.
Sourcepub fn impls(self) -> QueryBuilder<'a>
pub fn impls(self) -> QueryBuilder<'a>
Filter by impl blocks.
Sourcepub fn methods(self) -> QueryBuilder<'a>
pub fn methods(self) -> QueryBuilder<'a>
Filter by methods.
Sourcepub fn kind(self, kind: SymbolKind) -> QueryBuilder<'a>
pub fn kind(self, kind: SymbolKind) -> QueryBuilder<'a>
Filter by a specific kind.
Sourcepub fn kinds(self, kinds: Vec<SymbolKind>) -> QueryBuilder<'a>
pub fn kinds(self, kinds: Vec<SymbolKind>) -> QueryBuilder<'a>
Filter by one of several kinds.
Sourcepub fn public(self) -> QueryBuilder<'a>
pub fn public(self) -> QueryBuilder<'a>
Filter by public visibility.
Sourcepub fn crate_visible(self) -> QueryBuilder<'a>
pub fn crate_visible(self) -> QueryBuilder<'a>
Filter by crate visibility (pub or pub(crate)).
Sourcepub fn private(self) -> QueryBuilder<'a>
pub fn private(self) -> QueryBuilder<'a>
Filter by private visibility.
Sourcepub fn in_module(self, module: impl Into<String>) -> QueryBuilder<'a>
pub fn in_module(self, module: impl Into<String>) -> QueryBuilder<'a>
Filter by module path (partial match).
Sourcepub fn in_crate(self, crate_name: impl Into<String>) -> QueryBuilder<'a>
pub fn in_crate(self, crate_name: impl Into<String>) -> QueryBuilder<'a>
Filter by crate name.
Sourcepub fn name_matches(self, pattern: Pattern) -> QueryBuilder<'a>
pub fn name_matches(self, pattern: Pattern) -> QueryBuilder<'a>
Filter by name pattern.
Sourcepub fn name(self, name: impl Into<String>) -> QueryBuilder<'a>
pub fn name(self, name: impl Into<String>) -> QueryBuilder<'a>
Filter by exact name.
Sourcepub fn name_glob(self, pattern: impl Into<String>) -> QueryBuilder<'a>
pub fn name_glob(self, pattern: impl Into<String>) -> QueryBuilder<'a>
Filter by glob pattern on name.
Sourcepub fn has_callers(self) -> QueryBuilder<'a>
pub fn has_callers(self) -> QueryBuilder<'a>
Filter symbols that have callers.
Sourcepub fn has_no_callers(self) -> QueryBuilder<'a>
pub fn has_no_callers(self) -> QueryBuilder<'a>
Filter symbols that have no callers (dead code candidates).
Sourcepub fn implements_trait(self, trait_id: SymbolId) -> QueryBuilder<'a>
pub fn implements_trait(self, trait_id: SymbolId) -> QueryBuilder<'a>
Filter symbols that implement a trait.
Sourcepub fn used_by(self, user_id: SymbolId) -> QueryBuilder<'a>
pub fn used_by(self, user_id: SymbolId) -> QueryBuilder<'a>
Filter symbols used by a specific symbol.
Auto Trait Implementations§
impl<'a> Freeze for QueryBuilder<'a>
impl<'a> RefUnwindSafe for QueryBuilder<'a>
impl<'a> Send for QueryBuilder<'a>
impl<'a> Sync for QueryBuilder<'a>
impl<'a> Unpin for QueryBuilder<'a>
impl<'a> UnsafeUnpin for QueryBuilder<'a>
impl<'a> UnwindSafe for QueryBuilder<'a>
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> 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