pub struct SearchFilter {
pub languages: Option<Vec<Language>>,
pub chunk_types: Option<Vec<ChunkType>>,
pub path_patterns: Option<Vec<String>>,
pub symbol_names: Option<Vec<String>>,
pub directories: Option<Vec<PathBuf>>,
pub exclude_directories: Option<Vec<PathBuf>>,
}Expand description
Filters to apply to search results.
Fields§
§languages: Option<Vec<Language>>Filter by languages.
chunk_types: Option<Vec<ChunkType>>Filter by chunk types.
path_patterns: Option<Vec<String>>Filter by file path patterns (glob).
symbol_names: Option<Vec<String>>Filter by symbol names (partial match).
directories: Option<Vec<PathBuf>>Include only files in these directories.
exclude_directories: Option<Vec<PathBuf>>Exclude files in these directories.
Implementations§
Source§impl SearchFilter
impl SearchFilter
Sourcepub fn chunk_types(self, types: Vec<ChunkType>) -> Self
pub fn chunk_types(self, types: Vec<ChunkType>) -> Self
Filter by chunk types.
Sourcepub fn path_patterns(self, patterns: Vec<String>) -> Self
pub fn path_patterns(self, patterns: Vec<String>) -> Self
Filter by path patterns.
Sourcepub fn symbol_names(self, names: Vec<String>) -> Self
pub fn symbol_names(self, names: Vec<String>) -> Self
Filter by symbol names.
Sourcepub fn in_directories(self, dirs: Vec<PathBuf>) -> Self
pub fn in_directories(self, dirs: Vec<PathBuf>) -> Self
Include only files in specific directories.
Sourcepub fn exclude_directories(self, dirs: Vec<PathBuf>) -> Self
pub fn exclude_directories(self, dirs: Vec<PathBuf>) -> Self
Exclude files in specific directories.
Trait Implementations§
Source§impl Clone for SearchFilter
impl Clone for SearchFilter
Source§fn clone(&self) -> SearchFilter
fn clone(&self) -> SearchFilter
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 moreSource§impl Debug for SearchFilter
impl Debug for SearchFilter
Source§impl Default for SearchFilter
impl Default for SearchFilter
Source§fn default() -> SearchFilter
fn default() -> SearchFilter
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SearchFilter
impl<'de> Deserialize<'de> for SearchFilter
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SearchFilter
impl RefUnwindSafe for SearchFilter
impl Send for SearchFilter
impl Sync for SearchFilter
impl Unpin for SearchFilter
impl UnwindSafe for SearchFilter
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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