Struct melior::dialect::ods::pdl_interp::CheckAttributeOperation
source · pub struct CheckAttributeOperation<'c> { /* private fields */ }
Expand description
A check_attribute
operation. Check the value of an Attribute
.
pdl_interp.check_attribute
operations compare the value of a given
attribute with a constant value. On success, this operation branches to the
true destination, otherwise the false destination is taken.
Example:
pdl_interp.check_attribute %attr is 10 -> ^matchDest, ^failureDest
Implementations§
source§impl<'c> CheckAttributeOperation<'c>
impl<'c> CheckAttributeOperation<'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>
) -> CheckAttributeOperationBuilder<'c, Unset, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> CheckAttributeOperationBuilder<'c, Unset, Unset, Unset, Unset>
Creates a builder.
pub fn attribute(&self) -> Result<Value<'c, '_>, Error>
pub fn true_dest(&self) -> Result<BlockRef<'c, '_>, Error>
pub fn false_dest(&self) -> Result<BlockRef<'c, '_>, Error>
pub fn constant_value(&self) -> Result<Attribute<'c>, Error>
pub fn set_constant_value(&mut self, value: Attribute<'c>)
Trait Implementations§
source§impl<'c> From<CheckAttributeOperation<'c>> for Operation<'c>
impl<'c> From<CheckAttributeOperation<'c>> for Operation<'c>
source§fn from(operation: CheckAttributeOperation<'c>) -> Self
fn from(operation: CheckAttributeOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for CheckAttributeOperation<'c>
impl<'c> !Send for CheckAttributeOperation<'c>
impl<'c> !Sync for CheckAttributeOperation<'c>
impl<'c> Unpin for CheckAttributeOperation<'c>
impl<'c> UnwindSafe for CheckAttributeOperation<'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