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.valueImplementations§
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> Clone for ExtractOperation<'c>
impl<'c> Clone for ExtractOperation<'c>
Source§fn clone(&self) -> ExtractOperation<'c>
fn clone(&self) -> ExtractOperation<'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 ExtractOperation<'c>
impl<'c> Debug for ExtractOperation<'c>
Source§impl<'b> From<ExtractOperation<'b>> for PdlInterpDialectOperation<'b>
impl<'b> From<ExtractOperation<'b>> for PdlInterpDialectOperation<'b>
Source§fn from(op: ExtractOperation<'b>) -> Self
fn from(op: ExtractOperation<'b>) -> Self
Converts to this type from the input type.
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.
Source§impl<'c> PartialEq for ExtractOperation<'c>
impl<'c> PartialEq for ExtractOperation<'c>
Source§impl<'c> TryFrom<Operation<'c>> for ExtractOperation<'c>
impl<'c> TryFrom<Operation<'c>> for ExtractOperation<'c>
impl<'c> Eq for ExtractOperation<'c>
impl<'c> StructuralPartialEq for ExtractOperation<'c>
Auto Trait Implementations§
impl<'c> Freeze for ExtractOperation<'c>
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