Struct melior::dialect::ods::pdl_interp::ExtractOperation
source · pub struct ExtractOperation<'c> { /* private fields */ }
Expand description
An extract
operation. Extract the item at the specified index in a range.
pdl_interp.extract
operations are used to extract an item from a range
at the specified index. If the index is out of range, returns null.
Example:
// Extract the value at index 1 from a range of values.
%ops = pdl_interp.extract 1 of %values : !pdl.value
Implementations§
source§impl<'c> ExtractOperation<'c>
impl<'c> ExtractOperation<'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>
) -> ExtractOperationBuilder<'c, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> ExtractOperationBuilder<'c, Unset, Unset, Unset>
Creates a builder.
pub fn result(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn range(&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<ExtractOperation<'c>> for Operation<'c>
impl<'c> From<ExtractOperation<'c>> for Operation<'c>
source§fn from(operation: ExtractOperation<'c>) -> Self
fn from(operation: ExtractOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for ExtractOperation<'c>
impl<'c> !Send for ExtractOperation<'c>
impl<'c> !Sync for ExtractOperation<'c>
impl<'c> Unpin for ExtractOperation<'c>
impl<'c> UnwindSafe for ExtractOperation<'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