Struct melior::dialect::ods::pdl_interp::SwitchOperationNameOperation
source · pub struct SwitchOperationNameOperation<'c> { /* private fields */ }
Expand description
A switch_operation_name
operation. Switch on the OperationName of an Operation
.
pdl_interp.switch_operation_name
operations compare the name of a given
operation with a set of known names. If the value matches one of the
provided case values the destination for that case value is taken, otherwise
the default destination is taken.
Example:
pdl_interp.switch_operation_name of %op to ["foo.op", "bar.op"](^fooDest, ^barDest) -> ^defaultDest
Implementations§
source§impl<'c> SwitchOperationNameOperation<'c>
impl<'c> SwitchOperationNameOperation<'c>
sourcepub fn as_operation(&self) -> &Operation<'c>
pub fn as_operation(&self) -> &Operation<'c>
Returns a generic operation.
sourcepub fn builder(
context: &'c Context,
location: Location<'c>
) -> SwitchOperationNameOperationBuilder<'c, Unset, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> SwitchOperationNameOperationBuilder<'c, Unset, Unset, Unset, Unset>
Creates a builder.
pub fn input_op(&self) -> Result<Value<'c, '_>, Error>
pub fn default_dest(&self) -> Result<BlockRef<'c, '_>, Error>
pub fn cases(&self) -> impl Iterator<Item = BlockRef<'c, '_>>
pub fn case_values(&self) -> Result<ArrayAttribute<'c>, Error>
pub fn set_case_values(&mut self, value: ArrayAttribute<'c>)
Trait Implementations§
source§impl<'c> From<SwitchOperationNameOperation<'c>> for Operation<'c>
impl<'c> From<SwitchOperationNameOperation<'c>> for Operation<'c>
source§fn from(operation: SwitchOperationNameOperation<'c>) -> Self
fn from(operation: SwitchOperationNameOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for SwitchOperationNameOperation<'c>
impl<'c> !Send for SwitchOperationNameOperation<'c>
impl<'c> !Sync for SwitchOperationNameOperation<'c>
impl<'c> Unpin for SwitchOperationNameOperation<'c>
impl<'c> UnwindSafe for SwitchOperationNameOperation<'c>
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