Struct cairo_lang_lowering::objects::StatementMatchEnum
source · pub struct StatementMatchEnum {
pub concrete_enum: ConcreteEnumId,
pub input: VariableId,
pub arms: Vec<(ConcreteVariant, BlockId)>,
pub outputs: Vec<VariableId>,
}Expand description
A statement that matches an enum, and “calls” a possibly different block for each branch.
Fields§
§concrete_enum: ConcreteEnumId§input: VariableIdA living variable in current scope to match on.
arms: Vec<(ConcreteVariant, BlockId)>Match arms. All blocks should have the same rets. Order must be identical to the order in the definition of the enum.
outputs: Vec<VariableId>New variables to be introduced into the current scope from the arm outputs.
Trait Implementations§
source§impl Clone for StatementMatchEnum
impl Clone for StatementMatchEnum
source§fn clone(&self) -> StatementMatchEnum
fn clone(&self) -> StatementMatchEnum
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 StatementMatchEnum
impl Debug for StatementMatchEnum
source§impl DebugWithDb<LoweredFormatter<'_>> for StatementMatchEnum
impl DebugWithDb<LoweredFormatter<'_>> for StatementMatchEnum
source§impl PartialEq<StatementMatchEnum> for StatementMatchEnum
impl PartialEq<StatementMatchEnum> for StatementMatchEnum
source§fn eq(&self, other: &StatementMatchEnum) -> bool
fn eq(&self, other: &StatementMatchEnum) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for StatementMatchEnum
impl StructuralEq for StatementMatchEnum
impl StructuralPartialEq for StatementMatchEnum
Auto Trait Implementations§
impl RefUnwindSafe for StatementMatchEnum
impl Send for StatementMatchEnum
impl Sync for StatementMatchEnum
impl Unpin for StatementMatchEnum
impl UnwindSafe for StatementMatchEnum
Blanket Implementations§
source§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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.