pub trait OperationsVTable<V: VTable> {
// Required methods
fn slice(
array: &V::Array,
start: usize,
stop: usize,
) -> VortexResult<ArrayRef>;
fn scalar_at(array: &V::Array, index: usize) -> VortexResult<Scalar>;
}
Required Methods§
Sourcefn slice(array: &V::Array, start: usize, stop: usize) -> VortexResult<ArrayRef>
fn slice(array: &V::Array, start: usize, stop: usize) -> VortexResult<ArrayRef>
Perform a constant-time slice of the array.
If an encoding cannot perform this slice in constant time, it should internally store an offset and length in order to defer slicing until the array is accessed.
This function returns ArrayRef
since some encodings can return a simpler array for
some slices, for example a crate::arrays::ChunkedArray
may slice into a single chunk.
§Preconditions
Bounds-checking has already been performed by the time this function is called.
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.