pub trait DictEncoder: Send {
// Required methods
fn encode(
&mut self,
array: &ArrayRef,
ctx: &mut ExecutionCtx,
) -> VortexResult<PrimitiveArray>;
fn reset(&mut self) -> ArrayRef;
fn codes_ptype(&self) -> PType;
}Required Methods§
Sourcefn encode(
&mut self,
array: &ArrayRef,
ctx: &mut ExecutionCtx,
) -> VortexResult<PrimitiveArray>
fn encode( &mut self, array: &ArrayRef, ctx: &mut ExecutionCtx, ) -> VortexResult<PrimitiveArray>
Assign dictionary codes to the given input array.
Sourcefn reset(&mut self) -> ArrayRef
fn reset(&mut self) -> ArrayRef
Clear the encoder state to make it ready for a new round of decoding.
Sourcefn codes_ptype(&self) -> PType
fn codes_ptype(&self) -> PType
Returns the PType of the codes this encoder produces.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".