pub enum TsQueryAst {
Term {
word: String,
weight_mask: u8,
},
And(Box<TsQueryAst>, Box<TsQueryAst>),
Or(Box<TsQueryAst>, Box<TsQueryAst>),
Not(Box<TsQueryAst>),
Phrase {
left: Box<TsQueryAst>,
right: Box<TsQueryAst>,
distance: u16,
},
}Expand description
v7.12.0 — parse tree for a PG tsquery. v7.12.0 ships the
type + codec only; the to_tsquery / plainto_tsquery lexer
lands in v7.12.1 and the @@ evaluator in v7.12.2.
Variants§
Term
Single lexeme term. The weight_mask is the PG-style
bitmask of accepted weights (A=1<<3, B=1<<2, C=1<<1,
D=1<<0); 0 = any weight. v7.12.0 always sets it to 0.
And(Box<TsQueryAst>, Box<TsQueryAst>)
Or(Box<TsQueryAst>, Box<TsQueryAst>)
Not(Box<TsQueryAst>)
Phrase
phrase <distance> phrase. v7.12.0 only persists this; the
match semantics arrive in v7.12.2 alongside @@.
Trait Implementations§
Source§impl Clone for TsQueryAst
impl Clone for TsQueryAst
Source§fn clone(&self) -> TsQueryAst
fn clone(&self) -> TsQueryAst
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 TsQueryAst
impl Debug for TsQueryAst
impl Eq for TsQueryAst
Source§impl PartialEq for TsQueryAst
impl PartialEq for TsQueryAst
impl StructuralPartialEq for TsQueryAst
Auto Trait Implementations§
impl Freeze for TsQueryAst
impl RefUnwindSafe for TsQueryAst
impl Send for TsQueryAst
impl Sync for TsQueryAst
impl Unpin for TsQueryAst
impl UnsafeUnpin for TsQueryAst
impl UnwindSafe for TsQueryAst
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