pub struct StatementNode {
pub lhs: Box<AssignableKind>,
pub rhs: Box<ExprKind>,
}
Expand description
Represents a statement node in the AST, such as variable = value
.
Fields§
§lhs: Box<AssignableKind>
The left-hand side of the statement, usually a variable.
rhs: Box<ExprKind>
The right-hand side of the statement, the value to assign.
Implementations§
Source§impl StatementNode
impl StatementNode
Sourcepub fn new(
lhs: Box<AssignableKind>,
rhs: Box<ExprKind>,
) -> Result<Self, AstNodeError>
pub fn new( lhs: Box<AssignableKind>, rhs: Box<ExprKind>, ) -> Result<Self, AstNodeError>
Trait Implementations§
Source§impl AstVisitable for StatementNode
impl AstVisitable for StatementNode
Source§impl Clone for StatementNode
impl Clone for StatementNode
Source§fn clone(&self) -> StatementNode
fn clone(&self) -> StatementNode
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 StatementNode
impl Debug for StatementNode
Source§impl<'de> Deserialize<'de> for StatementNode
impl<'de> Deserialize<'de> for StatementNode
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<StatementNode> for AstKind
impl From<StatementNode> for AstKind
Source§fn from(id: StatementNode) -> Self
fn from(id: StatementNode) -> Self
Converts to this type from the input type.
Source§impl From<StatementNode> for Box<AstKind>
impl From<StatementNode> for Box<AstKind>
Source§fn from(id: StatementNode) -> Self
fn from(id: StatementNode) -> Self
Converts to this type from the input type.
Source§impl PartialEq for StatementNode
impl PartialEq for StatementNode
Source§impl Serialize for StatementNode
impl Serialize for StatementNode
impl Eq for StatementNode
Auto Trait Implementations§
impl Freeze for StatementNode
impl RefUnwindSafe for StatementNode
impl Send for StatementNode
impl Sync for StatementNode
impl Unpin for StatementNode
impl UnwindSafe for StatementNode
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.