pub struct BinaryOperationNode {
pub lhs: Box<ExprKind>,
pub rhs: Box<ExprKind>,
pub op_type: BinOpType,
}
Expand description
Represents a binary operation node in the AST, such as a + b
.
Fields§
§lhs: Box<ExprKind>
The left-hand side of the binary operation.
rhs: Box<ExprKind>
The right-hand side of the binary operation.
op_type: BinOpType
The binary operation type.
Implementations§
Trait Implementations§
Source§impl AstVisitable for BinaryOperationNode
impl AstVisitable for BinaryOperationNode
Source§impl Clone for BinaryOperationNode
impl Clone for BinaryOperationNode
Source§fn clone(&self) -> BinaryOperationNode
fn clone(&self) -> BinaryOperationNode
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 BinaryOperationNode
impl Debug for BinaryOperationNode
Source§impl<'de> Deserialize<'de> for BinaryOperationNode
impl<'de> Deserialize<'de> for BinaryOperationNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<BinaryOperationNode> for AstKind
impl From<BinaryOperationNode> for AstKind
Source§fn from(id: BinaryOperationNode) -> Self
fn from(id: BinaryOperationNode) -> Self
Converts to this type from the input type.
Source§impl From<BinaryOperationNode> for Box<AstKind>
impl From<BinaryOperationNode> for Box<AstKind>
Source§fn from(id: BinaryOperationNode) -> Self
fn from(id: BinaryOperationNode) -> Self
Converts to this type from the input type.
Source§impl From<BinaryOperationNode> for Box<ExprKind>
impl From<BinaryOperationNode> for Box<ExprKind>
Source§fn from(id: BinaryOperationNode) -> Self
fn from(id: BinaryOperationNode) -> Self
Converts to this type from the input type.
Source§impl From<BinaryOperationNode> for ExprKind
impl From<BinaryOperationNode> for ExprKind
Source§fn from(id: BinaryOperationNode) -> Self
fn from(id: BinaryOperationNode) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BinaryOperationNode
impl PartialEq for BinaryOperationNode
Source§impl Serialize for BinaryOperationNode
impl Serialize for BinaryOperationNode
impl Eq for BinaryOperationNode
Auto Trait Implementations§
impl Freeze for BinaryOperationNode
impl RefUnwindSafe for BinaryOperationNode
impl Send for BinaryOperationNode
impl Sync for BinaryOperationNode
impl Unpin for BinaryOperationNode
impl UnwindSafe for BinaryOperationNode
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: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.