Trait zarrs::array::codec::AsyncBytesPartialDecoderTraits

source ·
pub trait AsyncBytesPartialDecoderTraits: Send + Sync {
    // Required method
    fn partial_decode<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        decoded_regions: &'life1 [ByteRange],
        options: &'life2 CodecOptions
    ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Vec<u8>>>, CodecError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided methods
    fn partial_decode_concat<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        decoded_regions: &'life1 [ByteRange],
        options: &'life2 CodecOptions
    ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, CodecError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn decode<'life0, 'life1, 'async_trait>(
        &'life0 self,
        options: &'life1 CodecOptions
    ) -> Pin<Box<dyn Future<Output = Result<MaybeBytes, CodecError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Available on crate feature async only.
Expand description

Asynchronous partial bytes decoder traits.

Required Methods§

source

fn partial_decode<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, decoded_regions: &'life1 [ByteRange], options: &'life2 CodecOptions ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Vec<u8>>>, CodecError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Partially decode bytes.

Returns None if partial decoding of the input handle returns None.

§Errors

Returns CodecError if a codec fails or a byte range is invalid.

Provided Methods§

source

fn partial_decode_concat<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, decoded_regions: &'life1 [ByteRange], options: &'life2 CodecOptions ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, CodecError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Partially decode bytes and concatenate.

Returns None if partial decoding of the input handle returns None.

§Errors

Returns CodecError if a codec fails or a byte range is invalid.

source

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

Decode all bytes.

Returns None if partial decoding of the input handle returns None.

§Errors

Returns CodecError if a codec fails.

Implementations on Foreign Types§

source§

impl AsyncBytesPartialDecoderTraits for Cursor<&[u8]>

source§

fn partial_decode<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, decoded_regions: &'life1 [ByteRange], _parallel: &'life2 CodecOptions ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Vec<u8>>>, CodecError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source§

impl AsyncBytesPartialDecoderTraits for Cursor<Vec<u8>>

source§

fn partial_decode<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, decoded_regions: &'life1 [ByteRange], _parallel: &'life2 CodecOptions ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Vec<u8>>>, CodecError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§