pub struct Precedence(pub u32);Expand description
Represents the precedence of an operator.
See: https://en.wikipedia.org/wiki/Order_of_operations
Tuple Fields§
§0: u32Implementations§
Source§impl Precedence
impl Precedence
Sourcepub const VERY_LOW: Precedence
pub const VERY_LOW: Precedence
Very low precedence.
Sourcepub const LOW: Precedence
pub const LOW: Precedence
Low precedence, used for addition (+) and subtraction (-) operators.
Sourcepub const MEDIUM: Precedence
pub const MEDIUM: Precedence
Medium precedence, used for multiplication (*) and division (/) operators.
Sourcepub const HIGH: Precedence
pub const HIGH: Precedence
High precedence, used for power (^) operator.
Sourcepub const VERY_HIGH: Precedence
pub const VERY_HIGH: Precedence
Very high precedence.
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 · 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 Precedence
impl Debug for Precedence
Source§impl From<u32> for Precedence
impl From<u32> 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 · 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 Precedence
impl PartialEq for Precedence
Source§impl PartialOrd for Precedence
impl PartialOrd for Precedence
impl Copy for Precedence
impl Eq 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 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