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§
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<RawBytes<'_>>>, 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<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§
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<RawBytes<'_>>, 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<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.
Sourcefn 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,
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.