Skip to main content

OperationsVTable

Trait OperationsVTable 

Source
pub trait OperationsVTable<V: VTable> {
    // Required method
    fn scalar_at(
        array: ArrayView<'_, V>,
        index: usize,
        ctx: &mut ExecutionCtx,
    ) -> VortexResult<Scalar>;
}
Expand description

Element-level operations for an array encoding.

This trait is separated from VTable so encodings can organize scalar access independently from traversal, serialization, and execution. The erased ArrayRef methods perform common checks before dispatching here.

Required Methods§

Source

fn scalar_at( array: ArrayView<'_, V>, index: usize, ctx: &mut ExecutionCtx, ) -> VortexResult<Scalar>

Fetch the scalar at the given index.

§Preconditions

Bounds-checking has already been performed by the time this function is called, and the index is guaranteed to be non-null. Implementations may assume index < len.

§Postconditions

The returned Scalar must have the same logical dtype as the array’s element dtype.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§