pub struct TypesOperation<'c> { /* private fields */ }
Expand description
A types
operation. Define a range of type handles within a pattern.
pdl.types
operations capture result type constraints of Value
s, and
Operation
s. Instances of this operation define results types of a given
entity. A pdl.types
may partially constrain the results by specifying
an array of Type
s.
Example:
// Define a range of types:
%types = pdl.types
// Define a range of types with a range of constant values:
%types = pdl.types : [i32, i64, i32]
Implementations§
source§impl<'c> TypesOperation<'c>
impl<'c> TypesOperation<'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>
) -> TypesOperationBuilder<'c, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> TypesOperationBuilder<'c, Unset>
Creates a builder.
pub fn result(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn constant_types(&self) -> Result<ArrayAttribute<'c>, Error>
pub fn set_constant_types(&mut self, value: ArrayAttribute<'c>)
pub fn remove_constant_types(&mut self) -> Result<(), Error>
Trait Implementations§
source§impl<'c> From<TypesOperation<'c>> for Operation<'c>
impl<'c> From<TypesOperation<'c>> for Operation<'c>
source§fn from(operation: TypesOperation<'c>) -> Self
fn from(operation: TypesOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for TypesOperation<'c>
impl<'c> !Send for TypesOperation<'c>
impl<'c> !Sync for TypesOperation<'c>
impl<'c> Unpin for TypesOperation<'c>
impl<'c> UnwindSafe for TypesOperation<'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