pub struct UnaryOperationNode {
pub operand: Box<ExprKind>,
pub op_type: UnaryOpType,
}
Expand description
Represents a unary operation node in the AST, such as -a
or !b
.
Fields§
§operand: Box<ExprKind>
The operand of the unary operation.
op_type: UnaryOpType
The unary operation type.
Implementations§
Source§impl UnaryOperationNode
impl UnaryOperationNode
Sourcepub fn new(
operand: Box<ExprKind>,
op_type: UnaryOpType,
) -> Result<Self, AstNodeError>
pub fn new( operand: Box<ExprKind>, op_type: UnaryOpType, ) -> Result<Self, AstNodeError>
Trait Implementations§
Source§impl AstVisitable for UnaryOperationNode
impl AstVisitable for UnaryOperationNode
Source§impl Clone for UnaryOperationNode
impl Clone for UnaryOperationNode
Source§fn clone(&self) -> UnaryOperationNode
fn clone(&self) -> UnaryOperationNode
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 UnaryOperationNode
impl Debug for UnaryOperationNode
Source§impl<'de> Deserialize<'de> for UnaryOperationNode
impl<'de> Deserialize<'de> for UnaryOperationNode
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<UnaryOperationNode> for AstKind
impl From<UnaryOperationNode> for AstKind
Source§fn from(id: UnaryOperationNode) -> Self
fn from(id: UnaryOperationNode) -> Self
Converts to this type from the input type.
Source§impl From<UnaryOperationNode> for Box<AstKind>
impl From<UnaryOperationNode> for Box<AstKind>
Source§fn from(id: UnaryOperationNode) -> Self
fn from(id: UnaryOperationNode) -> Self
Converts to this type from the input type.
Source§impl From<UnaryOperationNode> for Box<ExprKind>
impl From<UnaryOperationNode> for Box<ExprKind>
Source§fn from(id: UnaryOperationNode) -> Self
fn from(id: UnaryOperationNode) -> Self
Converts to this type from the input type.
Source§impl From<UnaryOperationNode> for ExprKind
impl From<UnaryOperationNode> for ExprKind
Source§fn from(id: UnaryOperationNode) -> Self
fn from(id: UnaryOperationNode) -> Self
Converts to this type from the input type.
Source§impl PartialEq for UnaryOperationNode
impl PartialEq for UnaryOperationNode
Source§impl Serialize for UnaryOperationNode
impl Serialize for UnaryOperationNode
impl Eq for UnaryOperationNode
Auto Trait Implementations§
impl Freeze for UnaryOperationNode
impl RefUnwindSafe for UnaryOperationNode
impl Send for UnaryOperationNode
impl Sync for UnaryOperationNode
impl Unpin for UnaryOperationNode
impl UnwindSafe for UnaryOperationNode
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.