Struct debris_hir::hir_nodes::HirConditionalBranch
source · pub struct HirConditionalBranch {
pub span: Span,
pub is_comptime: bool,
pub condition: Box<HirExpression>,
pub block_positive: Box<HirBlock>,
pub block_negative: Option<Box<HirBlock>>,
}
Expand description
An if-branch which checks a condition and runs code depending on whether the condition is true or not
Fields§
§span: Span
§is_comptime: bool
§condition: Box<HirExpression>
§block_positive: Box<HirBlock>
§block_negative: Option<Box<HirBlock>>
Trait Implementations§
source§impl Debug for HirConditionalBranch
impl Debug for HirConditionalBranch
source§impl PartialEq for HirConditionalBranch
impl PartialEq for HirConditionalBranch
source§fn eq(&self, other: &HirConditionalBranch) -> bool
fn eq(&self, other: &HirConditionalBranch) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for HirConditionalBranch
impl StructuralEq for HirConditionalBranch
impl StructuralPartialEq for HirConditionalBranch
Auto Trait Implementations§
impl RefUnwindSafe for HirConditionalBranch
impl !Send for HirConditionalBranch
impl !Sync for HirConditionalBranch
impl Unpin for HirConditionalBranch
impl UnwindSafe for HirConditionalBranch
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.