pub struct ApplyNativeConstraintOperation<'c> { /* private fields */ }Expand description
An apply_native_constraint operation. Apply a native constraint to a set of provided entities.
pdl.apply_native_constraint operations apply a native C++ constraint, that
has been registered externally with the consumer of PDL, to a given set of
entities and optionally return a number of values.
Example:
// Apply `myConstraint` to the entities defined by `input`, `attr`, and `op`.
pdl.apply_native_constraint "myConstraint"(%input, %attr, %op : !pdl.value, !pdl.attribute, !pdl.operation)
// Apply constraint `with_result` to `root`. This constraint returns an attribute.
%attr = pdl.apply_native_constraint "with_result"(%root : !pdl.operation) : !pdl.attributeImplementations§
Source§impl<'c> ApplyNativeConstraintOperation<'c>
impl<'c> ApplyNativeConstraintOperation<'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>,
) -> ApplyNativeConstraintOperationBuilder<'c, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c>, ) -> ApplyNativeConstraintOperationBuilder<'c, Unset, Unset, Unset>
Creates a builder.
pub fn results(&self) -> impl Iterator<Item = OperationResult<'c, '_>>
pub fn args(&self) -> impl Iterator<Item = Value<'c, '_>>
pub fn _name(&self) -> Result<StringAttribute<'c>, Error>
pub fn set_name(&mut self, value: StringAttribute<'c>)
pub fn is_negated(&self) -> Result<Attribute<'c>, Error>
pub fn set_is_negated(&mut self, value: Attribute<'c>)
pub fn remove_is_negated(&mut self) -> Result<(), Error>
Trait Implementations§
Source§impl<'c> Clone for ApplyNativeConstraintOperation<'c>
impl<'c> Clone for ApplyNativeConstraintOperation<'c>
Source§fn clone(&self) -> ApplyNativeConstraintOperation<'c>
fn clone(&self) -> ApplyNativeConstraintOperation<'c>
Returns a duplicate 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<'c> Debug for ApplyNativeConstraintOperation<'c>
impl<'c> Debug for ApplyNativeConstraintOperation<'c>
Source§impl<'b> From<ApplyNativeConstraintOperation<'b>> for PdlDialectOperation<'b>
impl<'b> From<ApplyNativeConstraintOperation<'b>> for PdlDialectOperation<'b>
Source§fn from(op: ApplyNativeConstraintOperation<'b>) -> Self
fn from(op: ApplyNativeConstraintOperation<'b>) -> Self
Converts to this type from the input type.
Source§impl<'c> From<ApplyNativeConstraintOperation<'c>> for Operation<'c>
impl<'c> From<ApplyNativeConstraintOperation<'c>> for Operation<'c>
Source§fn from(operation: ApplyNativeConstraintOperation<'c>) -> Self
fn from(operation: ApplyNativeConstraintOperation<'c>) -> Self
Converts to this type from the input type.
Source§impl<'c> PartialEq for ApplyNativeConstraintOperation<'c>
impl<'c> PartialEq for ApplyNativeConstraintOperation<'c>
Source§fn eq(&self, other: &ApplyNativeConstraintOperation<'c>) -> bool
fn eq(&self, other: &ApplyNativeConstraintOperation<'c>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<'c> TryFrom<Operation<'c>> for ApplyNativeConstraintOperation<'c>
impl<'c> TryFrom<Operation<'c>> for ApplyNativeConstraintOperation<'c>
impl<'c> Eq for ApplyNativeConstraintOperation<'c>
impl<'c> StructuralPartialEq for ApplyNativeConstraintOperation<'c>
Auto Trait Implementations§
impl<'c> Freeze for ApplyNativeConstraintOperation<'c>
impl<'c> RefUnwindSafe for ApplyNativeConstraintOperation<'c>
impl<'c> !Send for ApplyNativeConstraintOperation<'c>
impl<'c> !Sync for ApplyNativeConstraintOperation<'c>
impl<'c> Unpin for ApplyNativeConstraintOperation<'c>
impl<'c> UnwindSafe for ApplyNativeConstraintOperation<'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