pub struct IndexingConfig {
pub language: Option<String>,
pub respect_ignore: bool,
pub parallel: bool,
pub include_tests: bool,
}Expand description
Configuration for function indexing.
Controls how functions are discovered and indexed in a project. Use the builder pattern to customize behavior.
§Examples
use go_brrr::IndexingConfig;
// Index only Python files, excluding tests
let config = IndexingConfig::new()
.with_language("python")
.exclude_tests();
// Index all languages with parallel processing
let config = IndexingConfig::new()
.with_parallel(true);Fields§
§language: Option<String>Optional language filter (e.g., “python”, “typescript”, “rust”). If None, indexes all supported languages.
respect_ignore: boolWhether to respect .gitignore and .brrrignore patterns. Defaults to true.
parallel: boolWhether to use parallel processing for indexing. Defaults to true.
include_tests: boolWhether to include test files in the index. Defaults to true.
Implementations§
Source§impl IndexingConfig
impl IndexingConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new indexing configuration with default settings.
Defaults:
- No language filter (indexes all languages)
- Respects ignore patterns
- Uses parallel processing
- Includes test files
Sourcepub fn with_language(self, lang: &str) -> Self
pub fn with_language(self, lang: &str) -> Self
Set the language filter.
Only files matching this language will be indexed.
§Arguments
lang- Language name (e.g., “python”, “typescript”, “rust”, “go”)
Sourcepub fn with_respect_ignore(self, respect: bool) -> Self
pub fn with_respect_ignore(self, respect: bool) -> Self
Set whether to respect ignore patterns.
If true (default), respects .gitignore and .brrrignore.
Sourcepub fn with_parallel(self, parallel: bool) -> Self
pub fn with_parallel(self, parallel: bool) -> Self
Set whether to use parallel processing.
If true (default), uses rayon for parallel file processing.
Sourcepub fn exclude_tests(self) -> Self
pub fn exclude_tests(self) -> Self
Exclude test files from the index.
Filters out files matching common test patterns.
Sourcepub fn include_tests(self) -> Self
pub fn include_tests(self) -> Self
Include test files in the index (default).
Trait Implementations§
Source§impl Clone for IndexingConfig
impl Clone for IndexingConfig
Source§fn clone(&self) -> IndexingConfig
fn clone(&self) -> IndexingConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IndexingConfig
impl Debug for IndexingConfig
Source§impl Default for IndexingConfig
impl Default for IndexingConfig
Source§fn default() -> IndexingConfig
fn default() -> IndexingConfig
Auto Trait Implementations§
impl Freeze for IndexingConfig
impl RefUnwindSafe for IndexingConfig
impl Send for IndexingConfig
impl Sync for IndexingConfig
impl Unpin for IndexingConfig
impl UnwindSafe for IndexingConfig
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> 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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request