pub struct BinOp {
pub kind: BinOpKind,
pub implicit: bool,
pub span: Range<usize>,
}Expand description
A binary operator that takes two operands.
Fields§
§kind: BinOpKindThe kind of binary operator.
implicit: boolWhether this binary operator was implicitly inserted by the parser.
span: Range<usize>The region of the source code that this operator was parsed from.
Implementations§
Source§impl BinOp
impl BinOp
Sourcepub fn precedence(&self) -> Precedence
pub fn precedence(&self) -> Precedence
Returns the precedence of the binary operation.
Sourcepub fn associativity(&self) -> Associativity
pub fn associativity(&self) -> Associativity
Returns the associativity of the binary operation.
Trait Implementations§
Source§impl Latex for BinOp
impl Latex for BinOp
Source§fn as_display(&self) -> LatexFormatter<'_, Self>
fn as_display(&self) -> LatexFormatter<'_, Self>
Wraps the value in a
LatexFormatter, which implements Display.Source§impl<'source> Parse<'source> for BinOp
impl<'source> Parse<'source> for BinOp
impl Eq for BinOp
impl StructuralPartialEq for BinOp
Auto Trait Implementations§
impl Freeze for BinOp
impl RefUnwindSafe for BinOp
impl Send for BinOp
impl Sync for BinOp
impl Unpin for BinOp
impl UnwindSafe for BinOp
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