pub struct SearchOptions {Show 16 fields
pub extensions: Option<Vec<String>>,
pub ignore_case: bool,
pub fuzzy: bool,
pub fuzzy_threshold: f64,
pub max_results: usize,
pub exclude: Option<Vec<String>>,
pub rank: bool,
pub cache: bool,
pub semantic: bool,
pub benchmark: bool,
pub vs_grep: bool,
pub use_bm25: bool,
pub context_filter: Option<ContextFilter>,
pub fixed_string: bool,
pub declaration_filter: Option<DeclarationFilter>,
pub context: usize,
}Expand description
Search options to bundle related parameters
Fields§
§extensions: Option<Vec<String>>§ignore_case: bool§fuzzy: bool§fuzzy_threshold: f64§max_results: usize§exclude: Option<Vec<String>>§rank: bool§cache: bool§semantic: bool§benchmark: bool§vs_grep: bool§use_bm25: bool§context_filter: Option<ContextFilter>§fixed_string: bool§declaration_filter: Option<DeclarationFilter>§context: usizeNumber of context lines to show around each match (0 = none)
Implementations§
Source§impl SearchOptions
impl SearchOptions
Sourcepub fn with_extensions(self, extensions: Vec<String>) -> Self
pub fn with_extensions(self, extensions: Vec<String>) -> Self
Builder pattern: set extensions
Sourcepub fn with_ignore_case(self, ignore_case: bool) -> Self
pub fn with_ignore_case(self, ignore_case: bool) -> Self
Builder pattern: set ignore_case
Sourcepub fn with_fuzzy(self, fuzzy: bool) -> Self
pub fn with_fuzzy(self, fuzzy: bool) -> Self
Builder pattern: set fuzzy
Sourcepub fn with_fuzzy_threshold(self, threshold: f64) -> Self
pub fn with_fuzzy_threshold(self, threshold: f64) -> Self
Builder pattern: set fuzzy_threshold
Sourcepub fn with_max_results(self, max: usize) -> Self
pub fn with_max_results(self, max: usize) -> Self
Builder pattern: set max_results
Sourcepub fn with_exclude(self, exclude: Vec<String>) -> Self
pub fn with_exclude(self, exclude: Vec<String>) -> Self
Builder pattern: set exclude
Sourcepub fn with_cache(self, cache: bool) -> Self
pub fn with_cache(self, cache: bool) -> Self
Builder pattern: set cache
Sourcepub fn with_semantic(self, semantic: bool) -> Self
pub fn with_semantic(self, semantic: bool) -> Self
Builder pattern: set semantic
Sourcepub fn with_benchmark(self, benchmark: bool) -> Self
pub fn with_benchmark(self, benchmark: bool) -> Self
Builder pattern: set benchmark
Sourcepub fn with_vs_grep(self, vs_grep: bool) -> Self
pub fn with_vs_grep(self, vs_grep: bool) -> Self
Builder pattern: set vs_grep
Sourcepub fn with_context(self, context: usize) -> Self
pub fn with_context(self, context: usize) -> Self
Builder pattern: set context lines around matches
Trait Implementations§
Source§impl Clone for SearchOptions
impl Clone for SearchOptions
Source§fn clone(&self) -> SearchOptions
fn clone(&self) -> SearchOptions
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 SearchOptions
impl Debug for SearchOptions
Auto Trait Implementations§
impl Freeze for SearchOptions
impl RefUnwindSafe for SearchOptions
impl Send for SearchOptions
impl Sync for SearchOptions
impl Unpin for SearchOptions
impl UnsafeUnpin for SearchOptions
impl UnwindSafe for SearchOptions
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