#[repr(u8)]pub enum Precedence {
Show 16 variants
Lowest = 1,
Or = 2,
And = 3,
Not = 4,
Equals = 5,
LessGreater = 6,
BitwiseOr = 7,
BitwiseXor = 8,
BitwiseAnd = 9,
BitwiseShift = 10,
Sum = 11,
Product = 12,
Prefix = 13,
Call = 14,
Index = 15,
Dot = 16,
}Expand description
Precedence levels (higher number = higher precedence)
Variants§
Lowest = 1
Lowest precedence
Or = 2
Logical operators (OR)
And = 3
Logical operators (AND)
Not = 4
NOT operator
Equals = 5
Comparison operators (=, <>, !=, IS, LIKE, IN, BETWEEN)
LessGreater = 6
Comparison operators (<, >, <=, >=)
BitwiseOr = 7
Bitwise OR (|)
BitwiseXor = 8
Bitwise XOR (^)
BitwiseAnd = 9
Bitwise AND (&)
BitwiseShift = 10
Bitwise shift (<<, >>)
Sum = 11
Addition and subtraction (+, -, ||)
Product = 12
Multiplication and division (*, /, %)
Prefix = 13
Prefix operators (-, +, NOT, ~)
Call = 14
Function calls
Index = 15
Array/JSON index access ([])
Dot = 16
Dot notation (table.column)
Implementations§
Source§impl Precedence
impl Precedence
Sourcepub fn for_operator(op: &str) -> Precedence
pub fn for_operator(op: &str) -> Precedence
Get precedence for an operator string
Trait Implementations§
Source§impl Clone for Precedence
impl Clone for Precedence
Source§fn clone(&self) -> Precedence
fn clone(&self) -> Precedence
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 moreimpl Copy for Precedence
Source§impl Debug for Precedence
impl Debug for Precedence
Source§impl Default for Precedence
impl Default for Precedence
Source§fn default() -> Precedence
fn default() -> Precedence
Returns the “default value” for a type. Read more
impl Eq for Precedence
Source§impl Ord for Precedence
impl Ord for Precedence
Source§fn cmp(&self, other: &Precedence) -> Ordering
fn cmp(&self, other: &Precedence) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for Precedence
impl PartialEq for Precedence
Source§impl PartialOrd for Precedence
impl PartialOrd for Precedence
impl StructuralPartialEq for Precedence
Auto Trait Implementations§
impl Freeze for Precedence
impl RefUnwindSafe for Precedence
impl Send for Precedence
impl Sync for Precedence
impl Unpin for Precedence
impl UnsafeUnpin for Precedence
impl UnwindSafe for Precedence
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