Enum debris_hir::hir_nodes::HirStatement
source · pub enum HirStatement {
VariableDecl(HirVariableInitialization),
VariableUpdate(HirVariableUpdate),
ControlFlow(HirControlFlow),
Block(HirBlock),
ConditionalBranch(HirConditionalBranch),
InfiniteLoop(HirInfiniteLoop),
Expression(HirExpression),
}
Expand description
Any statement, the difference to an expression is that a statement does not return anything
Variants§
VariableDecl(HirVariableInitialization)
A variable declaration, for example let foo = 1
VariableUpdate(HirVariableUpdate)
A write to an already existing variable
ControlFlow(HirControlFlow)
Controls the program flow
Block(HirBlock)
A normal block
ConditionalBranch(HirConditionalBranch)
A normal if statement
InfiniteLoop(HirInfiniteLoop)
Expression(HirExpression)
Implementations§
source§impl HirStatement
impl HirStatement
Trait Implementations§
source§impl Debug for HirStatement
impl Debug for HirStatement
source§impl PartialEq for HirStatement
impl PartialEq for HirStatement
source§fn eq(&self, other: &HirStatement) -> bool
fn eq(&self, other: &HirStatement) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for HirStatement
impl StructuralEq for HirStatement
impl StructuralPartialEq for HirStatement
Auto Trait Implementations§
impl RefUnwindSafe for HirStatement
impl !Send for HirStatement
impl !Sync for HirStatement
impl Unpin for HirStatement
impl UnwindSafe for HirStatement
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.