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§
sourcefn 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,
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§
sourcefn 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 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.
sourcefn 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,
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.