pub struct SearchFilter { /* private fields */ }Implementations§
Source§impl SearchFilter
impl SearchFilter
Sourcepub fn new(config: &SearchFilterConfig, index_root: &Path) -> Result<Self>
pub fn new(config: &SearchFilterConfig, index_root: &Path) -> Result<Self>
Sourcepub fn is_candidate(&self, rel_path: &Path) -> bool
pub fn is_candidate(&self, rel_path: &Path) -> bool
Check if a relative path passes all filters.
Sourcepub fn is_candidate_info(&self, info: &CandidateInfo) -> bool
pub fn is_candidate_info(&self, info: &CandidateInfo) -> bool
Check if a pre-computed CandidateInfo passes all filters.
More efficient than is_candidate when the candidate has already been prepared.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SearchFilter
impl RefUnwindSafe for SearchFilter
impl Send for SearchFilter
impl Sync for SearchFilter
impl Unpin for SearchFilter
impl UnsafeUnpin 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> 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