Skip to main content

ScalarFnArrayVTable

Trait ScalarFnArrayVTable 

Source
pub trait ScalarFnArrayVTable: ScalarFnVTable {
    // Required methods
    fn serialize(
        &self,
        view: &ScalarFnArrayView<'_, Self>,
        session: &VortexSession,
    ) -> VortexResult<Option<Vec<u8>>>;
    fn deserialize(
        &self,
        dtype: &DType,
        len: usize,
        metadata: &[u8],
        children: &dyn ArrayChildren,
        session: &VortexSession,
    ) -> VortexResult<ScalarFnArrayParts<Self>>;
}

Required Methods§

Source

fn serialize( &self, view: &ScalarFnArrayView<'_, Self>, session: &VortexSession, ) -> VortexResult<Option<Vec<u8>>>

Serialize metadata for storing the scalar function as an array.

Notably, this metadata needs enough information to reconstruct the child DTypes, as well as the scalar function’s own options.

Source

fn deserialize( &self, dtype: &DType, len: usize, metadata: &[u8], children: &dyn ArrayChildren, session: &VortexSession, ) -> VortexResult<ScalarFnArrayParts<Self>>

Deserialize a scalar function array from its serialized components.

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§