Trait AsyncBytesPartialDecoderTraits

Source
pub trait AsyncBytesPartialDecoderTraits:
    Any
    + 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<RawBytes<'_>>>, 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<RawBytes<'_>>, 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<Option<RawBytes<'_>>, CodecError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
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<RawBytes<'_>>>, 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<RawBytes<'_>>, 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<Option<RawBytes<'_>>, 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<&'static [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<RawBytes<'_>>>, 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<RawBytes<'_>>>, CodecError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

impl AsyncBytesPartialDecoderTraits for Cursor<RawBytes<'static>>

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<RawBytes<'_>>>, CodecError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§