pub struct SearchOptionsBuilder { /* private fields */ }Expand description
Builder for SearchOptions
Implementations§
Source§impl SearchOptionsBuilder
impl SearchOptionsBuilder
pub fn new(depth: usize) -> Self
pub fn build(self) -> SearchOptions
Sourcepub fn sort(self, sort: Vec<SearchSort>) -> Self
pub fn sort(self, sort: Vec<SearchSort>) -> Self
Add sorting options to the searches results
Sourcepub fn inclusive(self, inclusive: bool) -> Self
pub fn inclusive(self, inclusive: bool) -> Self
Include the query itself in the results if it exactly matched
Sourcepub fn predictive(self, predictive: bool) -> Self
pub fn predictive(self, predictive: bool) -> Self
Enable predictive matching
Sourcepub fn corrective(self, mistakes: usize) -> Self
pub fn corrective(self, mistakes: usize) -> Self
Enable corrective searching
- mistakes: The maximum number of corrections to apply to the query string
Sourcepub fn prepend_prefix(self, prepend_prefix: bool) -> Self
pub fn prepend_prefix(self, prepend_prefix: bool) -> Self
Enable prepending the prefix to the results
I.E.
If query = “/root”
Without prepend_prefix:
/images
/documents
...With prepend_prefix:
/root/images
/root/documents
...Auto Trait Implementations§
impl Freeze for SearchOptionsBuilder
impl RefUnwindSafe for SearchOptionsBuilder
impl Send for SearchOptionsBuilder
impl Sync for SearchOptionsBuilder
impl Unpin for SearchOptionsBuilder
impl UnwindSafe for SearchOptionsBuilder
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