Struct melior::dialect::ods::pdl_interp::ApplyConstraintOperation
source · pub struct ApplyConstraintOperation<'c> { /* private fields */ }
Expand description
An apply_constraint
operation. Apply a constraint to a set of positional values.
pdl_interp.apply_constraint
operations apply a generic constraint, that
has been registered with the interpreter, with a given set of positional
values. On success, this operation branches to the true destination,
otherwise the false destination is taken.
Example:
// Apply `myConstraint` to the entities defined by `input`, `attr`, and
// `op`.
pdl_interp.apply_constraint "myConstraint"(%input, %attr, %op : !pdl.value, !pdl.attribute, !pdl.operation) -> ^matchDest, ^failureDest
Implementations§
source§impl<'c> ApplyConstraintOperation<'c>
impl<'c> ApplyConstraintOperation<'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>
) -> ApplyConstraintOperationBuilder<'c, Unset, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> ApplyConstraintOperationBuilder<'c, Unset, Unset, Unset, Unset>
Creates a builder.
pub fn args(&self) -> impl Iterator<Item = Value<'c, '_>>
pub fn true_dest(&self) -> Result<BlockRef<'c, '_>, Error>
pub fn false_dest(&self) -> Result<BlockRef<'c, '_>, Error>
pub fn _name(&self) -> Result<StringAttribute<'c>, Error>
pub fn set_name(&mut self, value: StringAttribute<'c>)
Trait Implementations§
source§impl<'c> From<ApplyConstraintOperation<'c>> for Operation<'c>
impl<'c> From<ApplyConstraintOperation<'c>> for Operation<'c>
source§fn from(operation: ApplyConstraintOperation<'c>) -> Self
fn from(operation: ApplyConstraintOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for ApplyConstraintOperation<'c>
impl<'c> !Send for ApplyConstraintOperation<'c>
impl<'c> !Sync for ApplyConstraintOperation<'c>
impl<'c> Unpin for ApplyConstraintOperation<'c>
impl<'c> UnwindSafe for ApplyConstraintOperation<'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