pub trait ScalarOrVectorRes<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
A result 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 result 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 result N, or None if it is not a VectorType.
Trait Implementations§
impl<T: Type, const N: usize> OpInterfaceMarker for dyn ScalarOrVectorRes<T, N>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".