Skip to main content

ArrayPartialEncoderTraits

Trait ArrayPartialEncoderTraits 

Source
pub trait ArrayPartialEncoderTraits:
    ArrayPartialDecoderTraits
    + Any
    + Send
    + Sync {
    // Required methods
    fn into_dyn_decoder(self: Arc<Self>) -> Arc<dyn ArrayPartialDecoderTraits>;
    fn erase(&self) -> Result<(), CodecError>;
    fn partial_encode(
        &self,
        indexer: &dyn Indexer,
        bytes: &ArrayBytes<'_>,
        options: &CodecOptions,
    ) -> Result<(), CodecError>;
    fn supports_partial_encode(&self) -> bool;
}
Expand description

Partial array encoder traits.

Required Methods§

Source

fn into_dyn_decoder(self: Arc<Self>) -> Arc<dyn ArrayPartialDecoderTraits>

Return the encoder as an Arc<ArrayPartialDecoderTraits>.

Source

fn erase(&self) -> Result<(), CodecError>

Erase the chunk.

§Errors

Returns an error if there is an underlying store error.

Source

fn partial_encode( &self, indexer: &dyn Indexer, bytes: &ArrayBytes<'_>, options: &CodecOptions, ) -> Result<(), CodecError>

Partially encode a chunk.

§Errors

Returns CodecError if a codec fails or an array subset is invalid.

Source

fn supports_partial_encode(&self) -> bool

Returns whether this encoder supports partial encoding.

If this returns true, the encoder can efficiently handle partial encoding operations. If this returns false, partial encoding will fall back to a full decode and encode operation.

Implementors§