pub trait ScalarOrVectorOpd<T: Type, const N: usize>: Op {
// Provided methods
fn scalar_or_vector_elem_ty(&self, ctx: &Context) -> TypedHandle<T> { ... }
fn vector_shape(&self, ctx: &Context) -> Option<(u32, VectorTypeKind)> { ... }
}Expand description
An operand whose type is either T or VectorType<T>.
Provided Methods§
Sourcefn scalar_or_vector_elem_ty(&self, ctx: &Context) -> TypedHandle<T>
fn scalar_or_vector_elem_ty(&self, ctx: &Context) -> TypedHandle<T>
Get the type of operand N, or its element type if its VectorType.
Sourcefn vector_shape(&self, ctx: &Context) -> Option<(u32, VectorTypeKind)>
fn vector_shape(&self, ctx: &Context) -> Option<(u32, VectorTypeKind)>
Get the vector shape of operand N, or None if it is not a VectorType.
Trait Implementations§
impl<T: Type, const N: usize> OpInterfaceMarker for dyn ScalarOrVectorOpd<T, N>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".