pub enum TsQueryAst {
Lexeme {
lexeme: Vec<u8>,
weight_mask: u8,
prefix: bool,
},
And(Box<TsQueryAst>, Box<TsQueryAst>),
Or(Box<TsQueryAst>, Box<TsQueryAst>),
Not(Box<TsQueryAst>),
Phrase {
distance: u16,
left: Box<TsQueryAst>,
right: Box<TsQueryAst>,
},
}Expand description
Tsquery AST. Wire format (preorder):
[u8 tag]
0 Lexeme [u16 len][bytes][u8 weight_mask][u8 flags(prefix=1)]
1 And [child][child]
2 Or [child][child]
3 Not [child]
4 Phrase [u16 distance][child][child]Variants§
Lexeme
And(Box<TsQueryAst>, Box<TsQueryAst>)
Or(Box<TsQueryAst>, Box<TsQueryAst>)
Not(Box<TsQueryAst>)
Phrase
Implementations§
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
Source§impl PartialEq for TsQueryAst
impl PartialEq for TsQueryAst
Source§fn eq(&self, other: &TsQueryAst) -> bool
fn eq(&self, other: &TsQueryAst) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.