pub struct SearchQueryBuilder { /* private fields */ }
Expand description
Builder for creating search queries
Implementations§
Source§impl SearchQueryBuilder
impl SearchQueryBuilder
Sourcepub fn content_types(self, types: Vec<ContentType>) -> Self
pub fn content_types(self, types: Vec<ContentType>) -> Self
Set content types to search in
Sourcepub fn include_files(self, patterns: Vec<String>) -> Self
pub fn include_files(self, patterns: Vec<String>) -> Self
Add file patterns to include
Sourcepub fn exclude_files(self, patterns: Vec<String>) -> Self
pub fn exclude_files(self, patterns: Vec<String>) -> Self
Add file patterns to exclude
Sourcepub fn max_results(self, max: usize) -> Self
pub fn max_results(self, max: usize) -> Self
Set maximum number of results
Sourcepub fn case_sensitive(self) -> Self
pub fn case_sensitive(self) -> Self
Enable case sensitive search
Sourcepub fn with_context(self, lines: usize) -> Self
pub fn with_context(self, lines: usize) -> Self
Include context around matches
Sourcepub fn without_context(self) -> Self
pub fn without_context(self) -> Self
Disable context around matches
Sourcepub fn build(self) -> SearchQuery
pub fn build(self) -> SearchQuery
Build the search query
Source§impl SearchQueryBuilder
Convenience functions for common search patterns
impl SearchQueryBuilder
Convenience functions for common search patterns
Sourcepub fn markdown_docs(query: impl Into<String>) -> Self
pub fn markdown_docs(query: impl Into<String>) -> Self
Search only in markdown documentation
Sourcepub fn js_comments(query: impl Into<String>) -> Self
pub fn js_comments(query: impl Into<String>) -> Self
Search only in JavaScript/TypeScript comments
Sourcepub fn python_docs(query: impl Into<String>) -> Self
pub fn python_docs(query: impl Into<String>) -> Self
Search only in Python docstrings and comments
Sourcepub fn json_config(query: impl Into<String>) -> Self
pub fn json_config(query: impl Into<String>) -> Self
Search only in JSON configuration files
Sourcepub fn yaml_config(query: impl Into<String>) -> Self
pub fn yaml_config(query: impl Into<String>) -> Self
Search only in YAML configuration files
Trait Implementations§
Source§impl Clone for SearchQueryBuilder
impl Clone for SearchQueryBuilder
Source§fn clone(&self) -> SearchQueryBuilder
fn clone(&self) -> SearchQueryBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for SearchQueryBuilder
impl RefUnwindSafe for SearchQueryBuilder
impl Send for SearchQueryBuilder
impl Sync for SearchQueryBuilder
impl Unpin for SearchQueryBuilder
impl UnwindSafe for SearchQueryBuilder
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> 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