pub struct RegexQueryProcessor { /* private fields */ }Expand description
§Query processor implementation based on regular expressions
§Examples
let regex_query_processor = RegexQueryProcessor::create(r#"a+"#).unwrap();
let parts = regex_query_processor.matching("bbabbbaab").unwrap();
assert_eq!(
parts,
Match::parts(vec![
Part::non_matching("bb"),
Part::matching("a"),
Part::non_matching("bbb"),
Part::matching("aa"),
Part::non_matching("b"),
])
);Implementations§
Trait Implementations§
Source§impl Clone for RegexQueryProcessor
impl Clone for RegexQueryProcessor
Source§fn clone(&self) -> RegexQueryProcessor
fn clone(&self) -> RegexQueryProcessor
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 RegexQueryProcessor
impl Debug for RegexQueryProcessor
Source§impl QueryProcessor for RegexQueryProcessor
impl QueryProcessor for RegexQueryProcessor
Source§fn matching(&self, haystack: &str) -> Option<Match>
fn matching(&self, haystack: &str) -> Option<Match>
Applies generic query to string. Read more
Source§fn matching_expression(
&self,
_haystack: &str,
) -> Option<(String, String, Option<String>)>
fn matching_expression( &self, _haystack: &str, ) -> Option<(String, String, Option<String>)>
Applies expression query to string. Read more
Auto Trait Implementations§
impl Freeze for RegexQueryProcessor
impl RefUnwindSafe for RegexQueryProcessor
impl Send for RegexQueryProcessor
impl Sync for RegexQueryProcessor
impl Unpin for RegexQueryProcessor
impl UnsafeUnpin for RegexQueryProcessor
impl UnwindSafe for RegexQueryProcessor
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