Skip to main content

CastKernel

Trait CastKernel 

Source
pub trait CastKernel: VTable {
    // Required method
    fn cast(
        array: &Self::Array,
        dtype: &DType,
        ctx: &mut ExecutionCtx,
    ) -> VortexResult<Option<ArrayRef>>;
}
Expand description

Execute kernel for cast: perform the actual value conversion, potentially reading buffers.

Canonical array types implement this to do the real type conversion work. For example, PrimitiveArray converts numeric values between types.

Returns Ok(None) if this kernel cannot handle the given dtype conversion.

Required Methods§

Source

fn cast( array: &Self::Array, dtype: &DType, ctx: &mut ExecutionCtx, ) -> VortexResult<Option<ArrayRef>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§