Struct melior::dialect::ods::pdl_interp::GetResultsOperation
source · pub struct GetResultsOperation<'c> { /* private fields */ }
Expand description
A get_results
operation. Get a specified result group from an Operation
.
pdl_interp.get_results
operations try to get a specific result group
from an operation. If the expected result is a single Value, null is
returned if the result group is not of size 1. If a range is expected,
null is returned if the result group is invalid. If no index is provided,
the returned operand group corresponds to all results of the operation.
Example:
// Get the first group of results from an operation, and expect a single
// element.
%result = pdl_interp.get_results 0 of %op : !pdl.value
// Get the first group of results from an operation.
%results = pdl_interp.get_results 0 of %op : !pdl.range<value>
// Get all of the results from an operation.
%results = pdl_interp.get_results of %op : !pdl.range<value>
Implementations§
source§impl<'c> GetResultsOperation<'c>
impl<'c> GetResultsOperation<'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>
) -> GetResultsOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> GetResultsOperationBuilder<'c, 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>)
pub fn remove_index(&mut self) -> Result<(), Error>
Trait Implementations§
source§impl<'c> From<GetResultsOperation<'c>> for Operation<'c>
impl<'c> From<GetResultsOperation<'c>> for Operation<'c>
source§fn from(operation: GetResultsOperation<'c>) -> Self
fn from(operation: GetResultsOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for GetResultsOperation<'c>
impl<'c> !Send for GetResultsOperation<'c>
impl<'c> !Sync for GetResultsOperation<'c>
impl<'c> Unpin for GetResultsOperation<'c>
impl<'c> UnwindSafe for GetResultsOperation<'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