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