Struct melior::dialect::ods::pdl_interp::CreateOperationOperation
source · pub struct CreateOperationOperation<'c> { /* private fields */ }
Expand description
A create_operation
operation. Create an instance of a specific Operation
.
pdl_interp.create_operation
operations create an Operation
instance with
the specified attributes, operands, and result types. See pdl.operation
for a more detailed description on the general interpretation of the arguments
to this operation.
Example:
// Create an instance of a `foo.op` operation.
%op = pdl_interp.create_operation "foo.op"(%arg0 : !pdl.value) {"attrA" = %attr0} -> (%type : !pdl.type)
// Create an instance of a `foo.op` operation that has inferred result types
// (using the InferTypeOpInterface).
%op = pdl_interp.create_operation "foo.op"(%arg0 : !pdl.value) {"attrA" = %attr0} -> <inferred>
Implementations§
source§impl<'c> CreateOperationOperation<'c>
impl<'c> CreateOperationOperation<'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>
) -> CreateOperationOperationBuilder<'c, Unset, Unset, Unset, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> CreateOperationOperationBuilder<'c, Unset, Unset, Unset, Unset, Unset, Unset>
Creates a builder.
pub fn result_op(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn input_operands( &self ) -> Result<impl Iterator<Item = Value<'c, '_>>, Error>
pub fn input_attributes( &self ) -> Result<impl Iterator<Item = Value<'c, '_>>, Error>
pub fn input_result_types( &self ) -> Result<impl Iterator<Item = Value<'c, '_>>, Error>
pub fn _name(&self) -> Result<StringAttribute<'c>, Error>
pub fn set_name(&mut self, value: StringAttribute<'c>)
pub fn input_attribute_names(&self) -> Result<ArrayAttribute<'c>, Error>
pub fn set_input_attribute_names(&mut self, value: ArrayAttribute<'c>)
pub fn inferred_result_types(&self) -> Result<Attribute<'c>, Error>
pub fn set_inferred_result_types(&mut self, value: Attribute<'c>)
pub fn remove_inferred_result_types(&mut self) -> Result<(), Error>
Trait Implementations§
source§impl<'c> From<CreateOperationOperation<'c>> for Operation<'c>
impl<'c> From<CreateOperationOperation<'c>> for Operation<'c>
source§fn from(operation: CreateOperationOperation<'c>) -> Self
fn from(operation: CreateOperationOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for CreateOperationOperation<'c>
impl<'c> !Send for CreateOperationOperation<'c>
impl<'c> !Sync for CreateOperationOperation<'c>
impl<'c> Unpin for CreateOperationOperation<'c>
impl<'c> UnwindSafe for CreateOperationOperation<'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