#[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 duplicate 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§impl PartialOrd for OpPriority
impl PartialOrd for OpPriority
impl 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