pub struct Matcher { /* private fields */ }Expand description
The main interface with this library is via Matcher objects.
§Examples:
use bqrs::Matcher;
// this matcher matches any text that contains the words
// 'these', 'those' and either 'this' or 'that'
let myquery = Matcher::from("(\"this\" | \"that\") & \"these\" & \"those\"").unwrap();
assert!(myquery.query("this these those"));
assert!(myquery.query("that these those"));
// doesn't contain 'those'
assert!(!myquery.query("this that these"));The matcher struct holds a single query object.
Implementations§
Auto Trait Implementations§
impl Freeze for Matcher
impl RefUnwindSafe for Matcher
impl Send for Matcher
impl Sync for Matcher
impl Unpin for Matcher
impl UnwindSafe for Matcher
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