Skip to main content

AsyncArrayPartialEncoderTraits

Trait AsyncArrayPartialEncoderTraits 

Source
pub trait AsyncArrayPartialEncoderTraits:
    AsyncArrayPartialDecoderTraits
    + Any
    + Send
    + Sync {
    // Required methods
    fn into_dyn_decoder(
        self: Arc<Self>,
    ) -> Arc<dyn AsyncArrayPartialDecoderTraits>;
    fn erase<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), CodecError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn partial_encode<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        indexer: &'life1 dyn Indexer,
        bytes: &'life2 ArrayBytes<'life3>,
        options: &'life4 CodecOptions,
    ) -> Pin<Box<dyn Future<Output = Result<(), CodecError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait,
             Self: 'async_trait;
    fn supports_partial_encode(&self) -> bool;
}
Available on crate feature async only.
Expand description

Asynchronous partial array encoder traits.

Required Methods§

Source

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

Return the encoder as an Arc<AsyncArrayPartialDecoderTraits>.

Source

fn erase<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), CodecError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Erase the chunk.

§Errors

Returns an error if there is an underlying store error.

Source

fn partial_encode<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, indexer: &'life1 dyn Indexer, bytes: &'life2 ArrayBytes<'life3>, options: &'life4 CodecOptions, ) -> Pin<Box<dyn Future<Output = Result<(), CodecError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, Self: 'async_trait,

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§