Struct melior::dialect::ods::pdl_interp::GetOperandOperation
source · pub struct GetOperandOperation<'c> { /* private fields */ }
Expand description
A get_operand
operation. Get a specified operand from an Operation
.
pdl_interp.get_operand
operations try to get a specific operand from an
operation If the operation does not have an operand for the given index, a
null value is returned.
Example:
%operand = pdl_interp.get_operand 1 of %op
Implementations§
source§impl<'c> GetOperandOperation<'c>
impl<'c> GetOperandOperation<'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>
) -> GetOperandOperationBuilder<'c, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> GetOperandOperationBuilder<'c, Unset, Unset, Unset>
Creates a builder.
pub fn value(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn input_op(&self) -> Result<Value<'c, '_>, Error>
pub fn index(&self) -> Result<IntegerAttribute<'c>, Error>
pub fn set_index(&mut self, value: IntegerAttribute<'c>)
Trait Implementations§
source§impl<'c> From<GetOperandOperation<'c>> for Operation<'c>
impl<'c> From<GetOperandOperation<'c>> for Operation<'c>
source§fn from(operation: GetOperandOperation<'c>) -> Self
fn from(operation: GetOperandOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for GetOperandOperation<'c>
impl<'c> !Send for GetOperandOperation<'c>
impl<'c> !Sync for GetOperandOperation<'c>
impl<'c> Unpin for GetOperandOperation<'c>
impl<'c> UnwindSafe for GetOperandOperation<'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