pub trait OperationPtrExt: Sized {
Show 20 methods
// Required methods
fn cast<T: ?Sized + OpInterfaceMarker + 'static>(
self,
ctx: &Context,
) -> Option<TraitOp<T>>;
fn as_op<T: Op>(self, ctx: &Context) -> Option<T>;
fn dyn_op(self, ctx: &Context) -> OpObj;
fn operand(self, ctx: &Context, idx: usize) -> Value;
fn operand_as_use(self, ctx: &Context, idx: usize) -> Use<Value>;
fn operands(self, ctx: &Context) -> Vec<Value>;
fn operands_as_uses(self, ctx: &Context) -> Vec<Use<Value>>;
fn result(self, ctx: &Context) -> Value;
fn results(self, ctx: &Context) -> Vec<Value>;
fn result_types(self, ctx: &Context) -> Vec<TypeHandle>;
fn regions(self, ctx: &Context) -> Vec<Ptr<Region>>;
fn result_names(self, ctx: &Context) -> Vec<Option<Identifier>>;
fn opt_result(self, ctx: &Context) -> Option<Value>;
fn get_attr<'a, T: Attribute>(
self,
ctx: &'a Context,
key: &Identifier,
) -> Option<Ref<'a, T>>;
fn set_attr<T: Attribute>(self, ctx: &Context, key: &Identifier, value: T);
fn parent_module(self, ctx: &Context) -> ModuleOp;
fn is_ancestor_of(self, ctx: &Context, other: Ptr<Operation>) -> bool;
// Provided methods
fn is_op<T: Op>(self, ctx: &Context) -> bool { ... }
fn is_terminator(self, ctx: &Context) -> bool { ... }
fn impls<T: ?Sized + OpInterfaceMarker + 'static>(
self,
ctx: &Context,
) -> bool { ... }
}Required Methods§
fn cast<T: ?Sized + OpInterfaceMarker + 'static>( self, ctx: &Context, ) -> Option<TraitOp<T>>
fn as_op<T: Op>(self, ctx: &Context) -> Option<T>
fn dyn_op(self, ctx: &Context) -> OpObj
fn operand(self, ctx: &Context, idx: usize) -> Value
fn operand_as_use(self, ctx: &Context, idx: usize) -> Use<Value>
fn operands(self, ctx: &Context) -> Vec<Value>
fn operands_as_uses(self, ctx: &Context) -> Vec<Use<Value>>
fn result(self, ctx: &Context) -> Value
fn results(self, ctx: &Context) -> Vec<Value>
fn result_types(self, ctx: &Context) -> Vec<TypeHandle>
fn regions(self, ctx: &Context) -> Vec<Ptr<Region>>
fn result_names(self, ctx: &Context) -> Vec<Option<Identifier>>
fn opt_result(self, ctx: &Context) -> Option<Value>
fn get_attr<'a, T: Attribute>( self, ctx: &'a Context, key: &Identifier, ) -> Option<Ref<'a, T>>
fn set_attr<T: Attribute>(self, ctx: &Context, key: &Identifier, value: T)
fn parent_module(self, ctx: &Context) -> ModuleOp
fn is_ancestor_of(self, ctx: &Context, other: Ptr<Operation>) -> bool
Provided Methods§
fn is_op<T: Op>(self, ctx: &Context) -> bool
fn is_terminator(self, ctx: &Context) -> bool
fn impls<T: ?Sized + OpInterfaceMarker + 'static>(self, ctx: &Context) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".