Enum arithmetic_parser::OpPriority 
source · #[non_exhaustive]pub enum OpPriority {
    Or,
    And,
    Comparison,
    AddOrSub,
    MulOrDiv,
    Power,
    Negation,
    Call,
}Expand description
Priority of an operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Or
Boolean OR (||).
And
Boolean AND (&&).
Comparison
Equality and order comparisons: ==, !=, >, <, >=, <=.
AddOrSub
Addition or subtraction: + or -.
MulOrDiv
Multiplication or division: * or /.
Power
Power (^).
Negation
Numeric or Boolean negation: ! or unary -.
Call
Function or method call.
Implementations§
source§impl OpPriority
 
impl OpPriority
sourcepub const fn max_priority() -> Self
 
pub const fn max_priority() -> Self
Returns the maximum priority.
Trait Implementations§
source§impl Clone for OpPriority
 
impl Clone for OpPriority
source§fn clone(&self) -> OpPriority
 
fn clone(&self) -> OpPriority
Returns a copy of the value. Read more
1.0.0 · 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 OpPriority
 
impl Debug for OpPriority
source§impl Hash for OpPriority
 
impl Hash for OpPriority
source§impl Ord for OpPriority
 
impl Ord for OpPriority
source§fn cmp(&self, other: &OpPriority) -> Ordering
 
fn cmp(&self, other: &OpPriority) -> Ordering
1.21.0 · 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
source§impl PartialEq for OpPriority
 
impl PartialEq for OpPriority
source§fn eq(&self, other: &OpPriority) -> bool
 
fn eq(&self, other: &OpPriority) -> bool
This method tests for 
self and other values to be equal, and is used
by ==.source§impl PartialOrd for OpPriority
 
impl PartialOrd for OpPriority
source§fn partial_cmp(&self, other: &OpPriority) -> Option<Ordering>
 
fn partial_cmp(&self, other: &OpPriority) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
 
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for 
self and other) and is used by the <=
operator. Read moreimpl Copy for OpPriority
impl Eq for OpPriority
impl StructuralPartialEq for OpPriority
Auto Trait Implementations§
impl Freeze for OpPriority
impl RefUnwindSafe for OpPriority
impl Send for OpPriority
impl Sync for OpPriority
impl Unpin for OpPriority
impl UnwindSafe for OpPriority
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: Copy,
 
impl<T> CloneToUninit for Twhere
    T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
 
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
 
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)