pub struct SearchFilter;
Expand description
Handles search and filter operations on data
Implementations§
Source§impl SearchFilter
impl SearchFilter
Sourcepub fn perform_search(
data: &[Vec<String>],
pattern: &str,
) -> Result<Vec<(usize, usize)>>
pub fn perform_search( data: &[Vec<String>], pattern: &str, ) -> Result<Vec<(usize, usize)>>
Perform a regex search on data and return matching positions
Sourcepub fn apply_regex_filter(data: &[Value], pattern: &str) -> Result<Vec<Value>>
pub fn apply_regex_filter(data: &[Value], pattern: &str) -> Result<Vec<Value>>
Apply a regex filter to JSON data
Sourcepub fn apply_fuzzy_filter(
data: &[Value],
pattern: &str,
score_threshold: i64,
) -> Vec<usize>
pub fn apply_fuzzy_filter( data: &[Value], pattern: &str, score_threshold: i64, ) -> Vec<usize>
Apply fuzzy filter to data and return matching indices
Sourcepub fn find_matching_columns(
headers: &[&str],
pattern: &str,
) -> Vec<(usize, String)>
pub fn find_matching_columns( headers: &[&str], pattern: &str, ) -> Vec<(usize, String)>
Find columns matching a search pattern
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> 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